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 2021/07/06 10:12:00 UTC

[GitHub] [drill] dzamo opened a new pull request #2267: DRILL-7968: ANALYZE TABLE ... REFRESH METADATA fails with FLOAT4 column.

dzamo opened a new pull request #2267:
URL: https://github.com/apache/drill/pull/2267


   This commit adds support for java.lang.Float to PojoWriters.java and a
   test for the problem described in DRILL-7968 to TestMetastoreCommands.java.
   
   For tables with fewer than ~200 rows and a FLOAT4 column there is no bug: the ANALYZE command succeeds and, indeed, this case is exercised by tests in TestMetastoreCommands.java and alltypes_{required,optional}.parquet which both contain a FLOAT4 column.
   
   But for tables with more than ~200 rows and a FLOAT4 column the ANALYZE command fails with
   
   ```
   SQL Error: EXECUTION_ERROR ERROR: PojoRecordReader doesn't yet support conversions from the type [class java.lang.Float].
   
   Failed to setup reader: DynamicPojoRecordReader
   ```
   
   E.g. you can reproduce the above with
   
   ```sql
   create table dfs.tmp.test_analyze as
   select cast(1 as float) from cp.`employee.json`;
   
   analyze table dfs.tmp.test_analyze refresh metadata;
   ```
   
   ## Documentation
   No user-visible change.
   
   ## Testing
   TestMetastoreCommands.java and ad hoc SQL testing.
   


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

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] dzamo merged pull request #2267: DRILL-7968: ANALYZE TABLE ... REFRESH METADATA fails with FLOAT4 column.

Posted by GitBox <gi...@apache.org>.
dzamo merged pull request #2267:
URL: https://github.com/apache/drill/pull/2267


   


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

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] dzamo commented on pull request #2267: DRILL-7968: ANALYZE TABLE ... REFRESH METADATA fails with FLOAT4 column.

Posted by GitBox <gi...@apache.org>.
dzamo commented on pull request #2267:
URL: https://github.com/apache/drill/pull/2267#issuecomment-875428440


   @luocooong I think all the builds have passed at least once now.  There is one cancelled main build reported under Checks.  Do I need to do any builds here?


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

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] dzamo commented on a change in pull request #2267: DRILL-7968: ANALYZE TABLE ... REFRESH METADATA fails with FLOAT4 column.

Posted by GitBox <gi...@apache.org>.
dzamo commented on a change in pull request #2267:
URL: https://github.com/apache/drill/pull/2267#discussion_r664488548



##########
File path: exec/java-exec/src/test/java/org/apache/drill/exec/sql/TestMetastoreCommands.java
##########
@@ -3531,6 +3531,40 @@ public void testAnalyzeWithNonWritableWorkspace() throws Exception {
     run("analyze table dfs.%s.%s refresh metadata", workspaceName, tableName);
   }
 
+  @Test
+  public void testAnalyzeAllTypes7kRows() throws Exception {
+    // See DRILL-7968.  More rows are produced here to test an ANALYZE code path

Review comment:
       Thank you, I've applied the fixes and a build+test run should kick off presently.




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

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] luocooong commented on a change in pull request #2267: DRILL-7968: ANALYZE TABLE ... REFRESH METADATA fails with FLOAT4 column.

Posted by GitBox <gi...@apache.org>.
luocooong commented on a change in pull request #2267:
URL: https://github.com/apache/drill/pull/2267#discussion_r664458580



##########
File path: exec/java-exec/src/test/java/org/apache/drill/exec/sql/TestMetastoreCommands.java
##########
@@ -3531,6 +3531,40 @@ public void testAnalyzeWithNonWritableWorkspace() throws Exception {
     run("analyze table dfs.%s.%s refresh metadata", workspaceName, tableName);
   }
 
+  @Test
+  public void testAnalyzeAllTypes7kRows() throws Exception {
+    // See DRILL-7968.  More rows are produced here to test an ANALYZE code path

Review comment:
       May be shortened to : 
   ```java
   @Test // DRILL-7968
   ```




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

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] luocooong commented on pull request #2267: DRILL-7968: ANALYZE TABLE ... REFRESH METADATA fails with FLOAT4 column.

Posted by GitBox <gi...@apache.org>.
luocooong commented on pull request #2267:
URL: https://github.com/apache/drill/pull/2267#issuecomment-875481721


   @dzamo It's time to merge. Squash all the commits for better.


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

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org