@@ -106,6 +106,7 @@ public void arrayWrite() throws Exception {
106106 public void arrayReadTest () throws Exception {
107107 // Create array and query
108108 try (Array array = new Array (ctx , arrayURI , TILEDB_READ );
109+ ArraySchema schema = array .getSchema ();
109110 Query query = new Query (array , TILEDB_READ )) {
110111
111112 // Slice only rows 1, 2 and cols 2, 3, 4
@@ -131,6 +132,12 @@ public void arrayReadTest() throws Exception {
131132 // Submit query
132133 query .submit ();
133134
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+
134141 HashMap <String , Pair <Long , Long >> resultElements = query .resultBufferElements ();
135142
136143 Assert .assertEquals (Long .valueOf (3 ), resultElements .get ("a1" ).getSecond ());
@@ -1097,6 +1104,7 @@ public void denseArrayReadTest() throws Exception {
10971104
10981105 // Create array and query
10991106 try (Array array = new Array (ctx , arrayURI , TILEDB_READ );
1107+ ArraySchema schema = array .getSchema ();
11001108 Query query = new Query (array , TILEDB_READ )) {
11011109
11021110 // Fetch all cells
@@ -1121,6 +1129,12 @@ public void denseArrayReadTest() throws Exception {
11211129
11221130 HashMap <String , Pair <Long , Long >> resultElements = query .resultBufferElements ();
11231131
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+
11241138 Assert .assertEquals (Long .valueOf (4 ), resultElements .get ("a1" ).getSecond ());
11251139 Assert .assertEquals (Long .valueOf (4 ), resultElements .get ("a2" ).getSecond ());
11261140
@@ -1148,6 +1162,7 @@ public void denseArrayNIOReadTest() throws Exception {
11481162
11491163 // Create array and query
11501164 try (Array array = new Array (ctx , arrayURI , TILEDB_READ );
1165+ ArraySchema schema = array .getSchema ();
11511166 Query query = new Query (array , TILEDB_READ )) {
11521167
11531168 // Fetch all cells
@@ -1189,6 +1204,12 @@ public void denseArrayNIOReadTest() throws Exception {
11891204 dimIdx ++;
11901205 }
11911206
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+
11921213 Assert .assertArrayEquals (new int [] {1 , 1 , 2 , 2 }, dim1 );
11931214 Assert .assertArrayEquals (new int [] {1 , 2 , 1 , 2 }, dim2 );
11941215 Assert .assertArrayEquals (new byte [] {'a' , 'b' , 'c' , 'd' }, a1 );
@@ -1217,6 +1238,7 @@ public void sparseArrayReadTest() throws Exception {
12171238
12181239 // Create array and query
12191240 try (Array array = new Array (ctx , arrayURI , TILEDB_READ );
1241+ ArraySchema schema = array .getSchema ();
12201242 Query query = new Query (array , TILEDB_READ )) {
12211243
12221244 query .setLayout (TILEDB_ROW_MAJOR );
@@ -1239,6 +1261,12 @@ public void sparseArrayReadTest() throws Exception {
12391261 byte [] a2 = (byte []) query .getBuffer ("a2" );
12401262 long [] a2Off = query .getVarBuffer ("a2" );
12411263
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+
12421270 Assert .assertEquals (Long .valueOf (5 ), resultElements .get ("a1" ).getSecond ());
12431271 Assert .assertEquals (Long .valueOf (10 ), resultElements .get ("a2" ).getSecond ());
12441272
@@ -1260,6 +1288,7 @@ public void sparseArrayNIOReadTest() throws Exception {
12601288
12611289 // Create array and query
12621290 try (Array array = new Array (ctx , arrayURI , TILEDB_READ );
1291+ ArraySchema schema = array .getSchema ();
12631292 Query query = new Query (array , TILEDB_READ )) {
12641293
12651294 query .setLayout (TILEDB_ROW_MAJOR );
@@ -1276,6 +1305,12 @@ public void sparseArrayNIOReadTest() throws Exception {
12761305 // Submit query
12771306 query .submit ();
12781307
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+
12791314 int [] a1Values = new int [5 ];
12801315 byte [] a1ByteMapValues = new byte [5 ];
12811316
0 commit comments