[ 
https://issues.apache.org/jira/browse/DRILL-5730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16286534#comment-16286534
 ] 

ASF GitHub Bot commented on DRILL-5730:
---------------------------------------

Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1045#discussion_r156177751
  
    --- Diff: 
contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/MaprDBJsonRecordReader.java
 ---
    @@ -117,7 +116,7 @@ public MaprDBJsonRecordReader(MapRDBSubScanSpec 
subScanSpec,
     
         disableCountOptimization = 
formatPluginConfig.disableCountOptimization();
         setColumns(projectedColumns);
    -    unionEnabled = 
context.getOptions().getOption(ExecConstants.ENABLE_UNION_TYPE);
    +    unionEnabled = 
context.getOptionSet().getOption(ExecConstants.ENABLE_UNION_TYPE);
    --- End diff --
    
    If you are cleaning up this code, consider using a newly added feature of 
the option manager, the ability to get the typed result. Rather than:
    
    ```
      public static final BooleanValidator ENABLE_UNION_TYPE = new 
BooleanValidator(ENABLE_UNION_TYPE_KEY);
    ...
    unionEnabled = 
context.getOptionSet().getOption(ExecConstants.ENABLE_UNION_TYPE);
    ```
    
    We can now do:
    ```
      public static final String ENABLE_UNION_TYPE_KEY = 
"exec.enable_union_type";
    ...
    unionEnabled = 
context.getOptionSet().getBoolean(ExecConstants.ENABLE_UNION_TYPE_KEY);
    ```
    
    This method handles value lookup, but also enforces types. (The existing 
code will just trigger an NPE if types don't match.) This new form also hides 
the details of the option validator as recent changes have ensured that the 
validators are already visible to the option manager internals.


> Fix Unit Test failures on JDK 8 And Some JDK 7 versions
> -------------------------------------------------------
>
>                 Key: DRILL-5730
>                 URL: https://issues.apache.org/jira/browse/DRILL-5730
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Timothy Farkas
>            Assignee: Timothy Farkas
>
> Tests fail on JDK 8 and oracle JDK 7 on my mac
> Failed tests: 
>   TestMetadataProvider.tables:153 expected:<OK> but was:<FAILED>
>   TestMetadataProvider.tablesWithTableNameFilter:212 expected:<OK> but 
> was:<FAILED>
>   TestMetadataProvider.tablesWithSystemTableFilter:187 expected:<OK> but 
> was:<FAILED>
>   TestMetadataProvider.tablesWithTableFilter:176 expected:<OK> but 
> was:<FAILED>
> Tests in error: 
>   TestInfoSchema.selectFromAllTables » UserRemote SYSTEM ERROR: 
> URISyntaxExcepti...
>   TestCustomUserAuthenticator.positiveUserAuth » UserRemote SYSTEM ERROR: 
> URISyn...
>   TestCustomUserAuthenticator.positiveUserAuthAfterNegativeUserAuth » 
> UserRemote
>   TestViewSupport.infoSchemaWithView:350->BaseTestQuery.testRunAndReturn:344 
> » Rpc
>   TestParquetScan.testSuccessFile:58->BaseTestQuery.testRunAndReturn:344 » 
> Rpc o...



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to