drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [drill] vdiravka commented on a change in pull request #1687: DRILL-2326: Fix scalar replacement for the case when static method which does not return values is called
Date Mon, 11 Mar 2019 17:38:08 GMT
vdiravka commented on a change in pull request #1687: DRILL-2326: Fix scalar replacement for
the case when static method which does not return values is called
URL: https://github.com/apache/drill/pull/1687#discussion_r264346419
 
 

 ##########
 File path: contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/TestInbuiltHiveUDFs.java
 ##########
 @@ -114,33 +115,33 @@ public void testRand() throws Exception {
             .go();
   }
 
-  @Test //DRILL-4868
+  @Test //DRILL-4868 & DRILL-2326
   public void testEmbeddedHiveFunctionCall() throws Exception {
-    // TODO(DRILL-2326) temporary until we fix the scalar replacement bug for this case
-    final OptionValue srOption = QueryTestUtil.setupScalarReplacementOption(bits[0], ClassTransformer.ScalarReplacementOption.TRY);
+    String query =
+        "SELECT convert_from(unhex(key2), 'INT_BE') as intkey \n" +
+        "FROM cp.`functions/conv/conv.json`";
+
+    List<String> compilers = Arrays.asList(ClassCompilerSelector.CompilerPolicy.JANINO.name(),
+        ClassCompilerSelector.CompilerPolicy.JDK.name());
 
     try {
-      final String[] queries = {
-          "SELECT convert_from(unhex(key2), 'INT_BE') as intkey \n" +
-              "FROM cp.`functions/conv/conv.json`",
-      };
+      setSessionOption(ExecConstants.SCALAR_REPLACEMENT_OPTION, ClassTransformer.ScalarReplacementOption.ON.name());
+      setSessionOption(ClassCompilerSelector.JAVA_COMPILER_DEBUG_OPTION, false);
 
 Review comment:
   Looks like `ClassCompilerSelector.JAVA_COMPILER_DEBUG_OPTION` can be unchanged. So then
for the debug level this test case can log the generated code (according the Javadoc for the
`ClassCompilerSelector`)

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message