KazydubB commented on a change in pull request #1641: DRILL-4858:
REPEATED_COUNT on an array of maps and an array of arrays is not implemented
URL: https://github.com/apache/drill/pull/1641#discussion_r257181825
##########
File path:
exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestNewSimpleRepeatedFunctions.java
##########
@@ -17,36 +17,161 @@
*/
package org.apache.drill.exec.fn.impl;
-import org.apache.drill.test.BaseTestQuery;
import org.apache.drill.categories.SqlFunctionTest;
+import org.apache.drill.test.ClusterFixture;
+import org.apache.drill.test.ClusterTest;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+
@Category(SqlFunctionTest.class)
-public class TestNewSimpleRepeatedFunctions extends BaseTestQuery {
+public class TestNewSimpleRepeatedFunctions extends ClusterTest {
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ startCluster(ClusterFixture.builder(dirTestWatcher));
+ }
+
@Test
public void testRepeatedContainsForWildCards() throws Exception {
- testBuilder().
- sqlQuery("select repeated_contains(topping, 'Choc*') from
cp.`testRepeatedWrite.json`")
- .ordered()
- .baselineColumns("EXPR$0")
- .baselineValues(true)
- .baselineValues(true)
- .baselineValues(true)
- .baselineValues(true)
- .baselineValues(false)
- .build().run();
-
- testBuilder().
- sqlQuery("select repeated_contains(topping, 'Pow*') from
cp.`testRepeatedWrite.json`")
- .ordered()
- .baselineColumns("EXPR$0")
- .baselineValues(true)
- .baselineValues(false)
- .baselineValues(false)
- .baselineValues(true)
- .baselineValues(false)
- .build().run();
+ testBuilder()
+ .sqlQuery("select repeated_contains(topping, 'Choc*') from
cp.`testRepeatedWrite.json`")
+ .ordered()
+ .baselineColumns("EXPR$0")
+ .baselineValuesForSingleColumn(true, true, true, true, false)
+ .go();
+
+ testBuilder()
Review comment:
Good suggestion - divided all other `@Test` methods to contain one
`testBuilder()` only, however left these two together (though updated) since
they test the same thing.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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