luocooong commented on code in PR #2515:
URL: https://github.com/apache/drill/pull/2515#discussion_r851627022


##########
exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/scan/v3/TestScanOuputSchema.java:
##########
@@ -327,4 +375,50 @@ public void 
testStrictProvidedSchemaWithWildcardAndSpecialCols() {
     assertFalse(scan.next());
     scanFixture.close();
   }
+
+  @Test
+  public void testProvidedSchemaWithListArray() {
+    TupleMetadata providedSchema = new SchemaBuilder()
+        .add("a", MinorType.INT)
+        .buildSchema();
+
+    BaseScanFixtureBuilder builder = new BaseScanFixtureBuilder(fixture);
+    builder.addReader(negotiator -> new MockSimpleReader(negotiator, true));
+    builder.builder.providedSchema(providedSchema);
+    builder.setProjection(new String[] { "a", "b", "c" });
+    builder.builder.nullType(Types.optional(MinorType.VARCHAR));
+    ScanFixture scanFixture = builder.build();
+    ScanOperatorExec scan = scanFixture.scanOp;
+
+    TupleMetadata expectedSchema = new SchemaBuilder()
+        .add("a", MinorType.INT)
+        .add("b", MinorType.VARCHAR)
+        .add("c", MinorType.VARCHAR)
+        .addRepeatedList("int_list")
+          .addArray(MinorType.INT)
+          .resumeSchema()
+        .addRepeatedList("long_list")

Review Comment:
   These tests are to verify the above fix. Is it better to split into a new 
test class?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@drill.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to