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

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

vvysotskyi commented on pull request #1985: DRILL-7565: ANALYZE TABLE ... 
REFRESH METADATA does not work for empty Parquet files
URL: https://github.com/apache/drill/pull/1985#discussion_r380077493
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/ExecConstants.java
 ##########
 @@ -511,6 +511,11 @@ private ExecConstants() {
       new OptionDescription("Available as of Drill 1.17. Sets the implicit 
column name for the lastModifiedTime column. " +
           "For internal usage when producing Metastore analyze."));
 
+  public static final String IMPLICIT_PROJECT_METADATA_COLUMN_LABEL = 
"drill.exec.storage.implicit.project_metadata.column.label";
+  public static final OptionValidator 
IMPLICIT_PROJECT_METADATA_COLUMN_LABEL_VALIDATOR = new 
StringValidator(IMPLICIT_PROJECT_METADATA_COLUMN_LABEL,
+      new OptionDescription("Available as of Drill 1.18. Sets the implicit 
column name for the $project_metadata$ column. " +
 
 Review comment:
   Good point about that. I specified version here and in other places to be 
consistent with other options descriptions.
   I think adding version in options descriptions was done to simplify updating 
docs for Drill Web site - there is no need to look up for the commit date and 
version of Drill, where it was added, just copy and paste it from Drill Web-UI, 
or from this class.
 
----------------------------------------------------------------
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]


> ANALYZE TABLE ... REFRESH METADATA does not work for empty Parquet files
> ------------------------------------------------------------------------
>
>                 Key: DRILL-7565
>                 URL: https://issues.apache.org/jira/browse/DRILL-7565
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.17.0
>            Reporter: Bohdan Kazydub
>            Assignee: Vova Vysotskyi
>            Priority: Major
>             Fix For: 1.18.0
>
>
> The following query does not create metadata for empty Parquet table:
> {code:java}
> @Test
>   public void testAnalyzeEmptyParquetTable() throws Exception {
>     dirTestWatcher.copyResourceToRoot(Paths.get("parquet", "empty"));
>     String tableName = "parquet/empty/simple/empty_simple.parquet";
>     try {
>       client.alterSession(ExecConstants.METASTORE_ENABLED, true);
>       testBuilder()
>           .sqlQuery("ANALYZE TABLE dfs.`%s` REFRESH METADATA", tableName)
>           .unOrdered()
>           .baselineColumns("ok", "summary")
>           .baselineValues(true, String.format("Collected / refreshed metadata 
> for table [dfs.default.%s]", tableName))
>           .go();
>     } finally {
>       run("analyze table dfs.`%s` drop metadata if exists", tableName);
>       client.resetSession(ExecConstants.METASTORE_ENABLED);
>     }
>   }
> {code}
> but yields
> {code:java}
> java.lang.AssertionError: Different number of records returned 
> Expected :1
> Actual   :0
> <Click to see difference>
>       at 
> org.apache.drill.test.DrillTestWrapper.compareResults(DrillTestWrapper.java:862)
>       at 
> org.apache.drill.test.DrillTestWrapper.compareUnorderedResults(DrillTestWrapper.java:567)
>       at org.apache.drill.test.DrillTestWrapper.run(DrillTestWrapper.java:171)
>       at org.apache.drill.test.TestBuilder.go(TestBuilder.java:145)
>       at 
> org.apache.drill.exec.store.parquet.TestEmptyParquet.testSelectWithDisabledMetastore(TestEmptyParquet.java:430)
>       at java.lang.Thread.run(Thread.java:748)
> {code}
> When changing expected result set to empty 
> ({{TestBuilder#expectsEmptyResultSet()}}), {{SHOW TABLES}} command after 
> {{ANALYZE TABLE ...}} does not show any table.



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

Reply via email to