The error message when running something similar to the above in SciDB 12.3 actually said that the problem was that the attribute was not nullable. The above would be hard to understand if I hadn’t seen the problem before in SciDB 12.3

The default value doesn’t appear in any of the above statements. For example, I would expect the default value of 1 to appear in scan and project. newRow in apply should have a 10 in the first row. Sum should be 6. Avg should be 2. What am I doing wrong? Thanks in advance,

This is an astute observation. There has been a lot of debate on default values versus null values versus empty cells. Your question brings up some of the mess from that discussion that wasn’t fully cleaned up.

If you have a “not empty” array as in “create not empty array foo <val:double default 2.5> [i=1:10,10,0]” and load values into it at i=1,2,3 you will see the rest of the chunk from 4 to 10 will become populated with the default value. That’s one use case. But the “not empty” structure itself is inconsistent at the moment. Cells in a chunk may not be missing, but entire chunks can still be missing. Moreover, “not empty” arrays can be unbounded, which is very strange. If you know what you are doing, you can get good results representing diagonal matrices with lots of 0s and things like that. But clearly the behavior needs improvement.

Historically, everything was “not empty” by default. Then empty was improved, thought-out and became default. Now the team is considering eliminating “not empty” for simplicity reasons. The exact question you ask - about insertion into multiple attributes where one of the inserted values is NULL - is completely valid. I’ll start a ticket to discuss.

All of the missing values are replaced with their default value. You do not even need to make the attributes nullable, in this case. If you have some attributes as ‘null’ and some as just missing, then you would need to make the attribute nullable.