arina-ielchiieva commented on a change in pull request #1844: DRILL-7326:
Support repeated lists for CTAS parquet format
URL: https://github.com/apache/drill/pull/1844#discussion_r315589605
##########
File path: exec/java-exec/src/test/java/org/apache/drill/exec/sql/TestCTAS.java
##########
@@ -357,6 +358,39 @@ public void
testTableIsFoundWithinWorkspaceWhenNameStartsWithSlash() throws Exce
}
}
+ @Test
+ public void testCtasForList() throws Exception {
+ String tableName = "testCtasForList";
+ try {
+ test("CREATE TABLE `%s`.`%s` AS SELECT l FROM
cp.`jsoninput/input2.json`", DFS_TMP_SCHEMA, tableName);
+ testBuilder()
+ .sqlQuery("SELECT * FROM `%s`.`%s` LIMIT 1", DFS_TMP_SCHEMA, "/" +
tableName)
+ .unOrdered()
+ .baselineColumns("l")
+ .baselineValues(asList(4L, 2L))
+ .go();
+ } finally {
+ test("DROP TABLE IF EXISTS `%s`.`%s`", DFS_TMP_SCHEMA, tableName);
+ }
+ }
+
+ @Test
+ public void testCtasForRepeatedList() throws Exception {
+ String tableName = "testCtasForRepeatedList";
+ try {
+ test("CREATE TABLE `%s`.`%s` AS SELECT * FROM
cp.`jsoninput/repeated_list_bug.json`", DFS_TMP_SCHEMA, tableName);
+ testBuilder()
+ .sqlQuery("SELECT rl FROM `%s`.`%s`", DFS_TMP_SCHEMA, "/" +
tableName)
Review comment:
Same here.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services