You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2020/03/17 14:30:33 UTC

[GitHub] [drill] vvysotskyi opened a new pull request #2028: DRILL-7643: Fix issues with using columns with the same name as a reserved keyword

vvysotskyi opened a new pull request #2028: DRILL-7643: Fix issues with using columns with the same name as a reserved keyword
URL: https://github.com/apache/drill/pull/2028
 
 
   # [DRILL-7643](https://issues.apache.org/jira/browse/DRILL-7643): Fix issues with using columns with the same name as a reserved keyword
   
   ## Description
   
   `SchemaPath.parseFromString()` method takes into an account reserved words and spaces in column names, so if the column wasn't escaped, it may fail, for example, the following calls will fail: `SchemaPath.parseFromString("date")`, `SchemaPath.parseFromString("column name")`, but the following calls are valid: ``SchemaPath.parseFromString("`date`")``, ``SchemaPath.parseFromString("`column name`")``.
   
   Revised usages of this method and replaced it where needed.
   
   ## Documentation
   NA
   
   ## Testing
   Updated existing tests to check this issue. Ran all tests suite.
   

----------------------------------------------------------------
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

[GitHub] [drill] arina-ielchiieva commented on issue #2028: DRILL-7643: Fix issues with using columns with the same name as a reserved keyword

Posted by GitBox <gi...@apache.org>.
arina-ielchiieva commented on issue #2028: DRILL-7643: Fix issues with using columns with the same name as a reserved keyword
URL: https://github.com/apache/drill/pull/2028#issuecomment-602024668
 
 
   @paul-rogers is PR ready to be merged?

----------------------------------------------------------------
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

[GitHub] [drill] vvysotskyi commented on a change in pull request #2028: DRILL-7643: Fix issues with using columns with the same name as a reserved keyword

Posted by GitBox <gi...@apache.org>.
vvysotskyi commented on a change in pull request #2028: DRILL-7643: Fix issues with using columns with the same name as a reserved keyword
URL: https://github.com/apache/drill/pull/2028#discussion_r395072672
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/RecordCollector.java
 ##########
 @@ -318,36 +319,39 @@ public MetastoreRecordCollector(Metastore metastore, FilterEvaluator filterEvalu
      * @param schemaPath schema name
      * @param table table instance
      * @param schema table or column schema
-     * @param parentColumnName parent column name if any
+     * @param parentColumnNames list of parent column names if any
      * @param columnIndex column index if any
      * @param isNested indicates if column is nested
      * @return list of column records
      */
     private List<Records.Column> columns(String schemaPath,
                                          BaseTableMetadata table,
                                          TupleMetadata schema,
-                                         String parentColumnName,
+                                         List<String> parentColumnNames,
 
 Review comment:
   This is a list that contains unquoted names of columns parent to this column. For example, for column `a.b.c.d`, when a column `d` will be handled in this method, the list would contain (`a`, `b`, `c`) columns. Array brackets are ignored.

----------------------------------------------------------------
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

[GitHub] [drill] asfgit closed pull request #2028: DRILL-7643: Fix issues with using columns with the same name as a reserved keyword

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #2028: DRILL-7643: Fix issues with using columns with the same name as a reserved keyword
URL: https://github.com/apache/drill/pull/2028
 
 
   

----------------------------------------------------------------
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

[GitHub] [drill] arina-ielchiieva commented on issue #2028: DRILL-7643: Fix issues with using columns with the same name as a reserved keyword

Posted by GitBox <gi...@apache.org>.
arina-ielchiieva commented on issue #2028: DRILL-7643: Fix issues with using columns with the same name as a reserved keyword
URL: https://github.com/apache/drill/pull/2028#issuecomment-600108300
 
 
   +1, LGTM

----------------------------------------------------------------
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

[GitHub] [drill] paul-rogers commented on a change in pull request #2028: DRILL-7643: Fix issues with using columns with the same name as a reserved keyword

Posted by GitBox <gi...@apache.org>.
paul-rogers commented on a change in pull request #2028: DRILL-7643: Fix issues with using columns with the same name as a reserved keyword
URL: https://github.com/apache/drill/pull/2028#discussion_r394683080
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/RecordCollector.java
 ##########
 @@ -318,36 +319,39 @@ public MetastoreRecordCollector(Metastore metastore, FilterEvaluator filterEvalu
      * @param schemaPath schema name
      * @param table table instance
      * @param schema table or column schema
-     * @param parentColumnName parent column name if any
+     * @param parentColumnNames list of parent column names if any
      * @param columnIndex column index if any
      * @param isNested indicates if column is nested
      * @return list of column records
      */
     private List<Records.Column> columns(String schemaPath,
                                          BaseTableMetadata table,
                                          TupleMetadata schema,
-                                         String parentColumnName,
+                                         List<String> parentColumnNames,
 
 Review comment:
   Should this be a list of names? Or a pointer to the parent? Seems redundant, for a name like `date[0].month` to have
   
   ```
   ([], 'date')
   (`date`, `[]`)
   (`date[]`, `month)
   ```
   
   Also, would be helpful to spell out what the names include. Am I right in the above examples? Are the array brackets included?

----------------------------------------------------------------
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