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

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

paul-rogers commented on pull request #2026: DRILL-7330: Implement metadata 
usage for all format plugins
URL: https://github.com/apache/drill/pull/2026#discussion_r394691383
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScanBatch.java
 ##########
 @@ -242,12 +242,12 @@ private IterOutcome internalNext() {
       if (implicitValues != null) {
         String projectMetadataColumn = 
context.getOptions().getOption(ExecConstants.IMPLICIT_PROJECT_METADATA_COLUMN_LABEL_VALIDATOR);
         if (recordCount > 0) {
-          // Sets the implicit value to false to signal that some results were 
returned and there is no need for creating an additional record.
-          implicitValues.replace(projectMetadataColumn, 
Boolean.FALSE.toString());
-        } else if 
(Boolean.parseBoolean(implicitValues.get(projectMetadataColumn))) {
+          // Sets the implicit value to null to signal that some results were 
returned and there is no need for creating an additional record.
+          implicitValues.replace(projectMetadataColumn, null);
+        } else if 
(Boolean.FALSE.toString().equals(implicitValues.get(projectMetadataColumn))) {
 
 Review comment:
   Any reason for use to be so specific here? The rule we've used in column 
properties is that `true` is if the value, converted to lower case, is "true", 
`false` otherwise. Else, we end up with values which are neither `true` nor 
`false` because they are some value like "FALSE".
   
   Maybe we need a utility conversion function: `isTrue(String value)` and 
`isFalse(String value)` where an invariant is that, for any string `s`, 
`isTrue(s) = !isFalse(s)`.
 
----------------------------------------------------------------
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]


> Implement metadata usage for text format plugin
> -----------------------------------------------
>
>                 Key: DRILL-7330
>                 URL: https://issues.apache.org/jira/browse/DRILL-7330
>             Project: Apache Drill
>          Issue Type: Sub-task
>            Reporter: Arina Ielchiieva
>            Assignee: Vova Vysotskyi
>            Priority: Major
>             Fix For: 1.18.0
>
>
> 1. Change the current group scan to leverage Schema from Metastore;
> 2. Use stats for enabling additional logical planning rules for text format 
> plugin. It will enable such optimizations as limit, filter push and so on.
> + add possibility to pass schema through schema file (using path or table 
> root), inline.
> + check for other enhancements in analyze command



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to