@@ -106,6 +106,7 @@ public void arrayWrite() throws Exception {
106
106
public void arrayReadTest () throws Exception {
107
107
// Create array and query
108
108
try (Array array = new Array (ctx , arrayURI , TILEDB_READ );
109
+ ArraySchema schema = array .getSchema ();
109
110
Query query = new Query (array , TILEDB_READ )) {
110
111
111
112
// Slice only rows 1, 2 and cols 2, 3, 4
@@ -131,6 +132,12 @@ public void arrayReadTest() throws Exception {
131
132
// Submit query
132
133
query .submit ();
133
134
135
+ try (Attribute attr1 = schema .getAttribute (0 );
136
+ Attribute attr2 = schema .getAttribute (1 )) {
137
+ Assert .assertFalse (attr1 .getNullable ());
138
+ Assert .assertFalse (attr2 .getNullable ());
139
+ }
140
+
134
141
HashMap <String , Pair <Long , Long >> resultElements = query .resultBufferElements ();
135
142
136
143
Assert .assertEquals (Long .valueOf (3 ), resultElements .get ("a1" ).getSecond ());
@@ -1097,6 +1104,7 @@ public void denseArrayReadTest() throws Exception {
1097
1104
1098
1105
// Create array and query
1099
1106
try (Array array = new Array (ctx , arrayURI , TILEDB_READ );
1107
+ ArraySchema schema = array .getSchema ();
1100
1108
Query query = new Query (array , TILEDB_READ )) {
1101
1109
1102
1110
// Fetch all cells
@@ -1121,6 +1129,12 @@ public void denseArrayReadTest() throws Exception {
1121
1129
1122
1130
HashMap <String , Pair <Long , Long >> resultElements = query .resultBufferElements ();
1123
1131
1132
+ try (Attribute a1 = schema .getAttribute (0 );
1133
+ Attribute a2 = schema .getAttribute (1 )) {
1134
+ Assert .assertTrue (a1 .getNullable ());
1135
+ Assert .assertTrue (a2 .getNullable ());
1136
+ }
1137
+
1124
1138
Assert .assertEquals (Long .valueOf (4 ), resultElements .get ("a1" ).getSecond ());
1125
1139
Assert .assertEquals (Long .valueOf (4 ), resultElements .get ("a2" ).getSecond ());
1126
1140
@@ -1148,6 +1162,7 @@ public void denseArrayNIOReadTest() throws Exception {
1148
1162
1149
1163
// Create array and query
1150
1164
try (Array array = new Array (ctx , arrayURI , TILEDB_READ );
1165
+ ArraySchema schema = array .getSchema ();
1151
1166
Query query = new Query (array , TILEDB_READ )) {
1152
1167
1153
1168
// Fetch all cells
@@ -1189,6 +1204,12 @@ public void denseArrayNIOReadTest() throws Exception {
1189
1204
dimIdx ++;
1190
1205
}
1191
1206
1207
+ try (Attribute attr1 = schema .getAttribute (0 );
1208
+ Attribute attr2 = schema .getAttribute (1 )) {
1209
+ Assert .assertTrue (attr1 .getNullable ());
1210
+ Assert .assertTrue (attr2 .getNullable ());
1211
+ }
1212
+
1192
1213
Assert .assertArrayEquals (new int [] {1 , 1 , 2 , 2 }, dim1 );
1193
1214
Assert .assertArrayEquals (new int [] {1 , 2 , 1 , 2 }, dim2 );
1194
1215
Assert .assertArrayEquals (new byte [] {'a' , 'b' , 'c' , 'd' }, a1 );
@@ -1217,6 +1238,7 @@ public void sparseArrayReadTest() throws Exception {
1217
1238
1218
1239
// Create array and query
1219
1240
try (Array array = new Array (ctx , arrayURI , TILEDB_READ );
1241
+ ArraySchema schema = array .getSchema ();
1220
1242
Query query = new Query (array , TILEDB_READ )) {
1221
1243
1222
1244
query .setLayout (TILEDB_ROW_MAJOR );
@@ -1239,6 +1261,12 @@ public void sparseArrayReadTest() throws Exception {
1239
1261
byte [] a2 = (byte []) query .getBuffer ("a2" );
1240
1262
long [] a2Off = query .getVarBuffer ("a2" );
1241
1263
1264
+ try (Attribute attr1 = schema .getAttribute (0 );
1265
+ Attribute attr2 = schema .getAttribute (1 )) {
1266
+ Assert .assertTrue (attr1 .getNullable ());
1267
+ Assert .assertTrue (attr2 .getNullable ());
1268
+ }
1269
+
1242
1270
Assert .assertEquals (Long .valueOf (5 ), resultElements .get ("a1" ).getSecond ());
1243
1271
Assert .assertEquals (Long .valueOf (10 ), resultElements .get ("a2" ).getSecond ());
1244
1272
@@ -1260,6 +1288,7 @@ public void sparseArrayNIOReadTest() throws Exception {
1260
1288
1261
1289
// Create array and query
1262
1290
try (Array array = new Array (ctx , arrayURI , TILEDB_READ );
1291
+ ArraySchema schema = array .getSchema ();
1263
1292
Query query = new Query (array , TILEDB_READ )) {
1264
1293
1265
1294
query .setLayout (TILEDB_ROW_MAJOR );
@@ -1276,6 +1305,12 @@ public void sparseArrayNIOReadTest() throws Exception {
1276
1305
// Submit query
1277
1306
query .submit ();
1278
1307
1308
+ try (Attribute attr1 = schema .getAttribute (0 );
1309
+ Attribute attr2 = schema .getAttribute (1 )) {
1310
+ Assert .assertTrue (attr1 .getNullable ());
1311
+ Assert .assertTrue (attr2 .getNullable ());
1312
+ }
1313
+
1279
1314
int [] a1Values = new int [5 ];
1280
1315
byte [] a1ByteMapValues = new byte [5 ];
1281
1316
0 commit comments