[
https://issues.apache.org/jira/browse/HIVE-20684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16637388#comment-16637388
]
Nishant Bangarwa commented on HIVE-20684:
-----------------------------------------
This one has multiple fixes to make analyze table column stats work for Druid -
# Add support for analyzing timestamp with timezone column type
# By default we were creating a druid scan query but were using a select query
reader.
# When creating a default scan query, column list was not passed to druid. This
led to mismatch in column order between DruidSerde and results coming from
druid. Leading to classCastExceptions in some cases OR columns data getting
mixed.
# TableScanDesc was incorrectly passed virtual columns in list of columns for
non-native tables. Added a fix to only pass in VirtualColumns for native
tables.
+cc [~ashutoshc] [~jcamachorodriguez]
> Analyze table compute stats fails for tables containing timestamp with local
> time zone column
> ---------------------------------------------------------------------------------------------
>
> Key: HIVE-20684
> URL: https://issues.apache.org/jira/browse/HIVE-20684
> Project: Hive
> Issue Type: Bug
> Reporter: Nishant Bangarwa
> Assignee: Nishant Bangarwa
> Priority: Major
> Attachments: HIVE-20684.patch
>
>
> Analyze table druid_table compute statistics for columns;
> Reference Exception -
> {code}
> org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException: Only
> integer/long/timestamp/date/float/double/string/binary/boolean/decimal
> type argument is accepted but timestamp with local time zone is passed.
> at
> org.apache.hadoop.hive.ql.udf.generic.GenericUDAFComputeStats.getEvaluator(GenericUDAFComputeStats.java:105)
> at
> org.apache.hadoop.hive.ql.udf.generic.AbstractGenericUDAFResolver.getEvaluator(AbstractGenericUDAFResolver.java:48)
> at
> org.apache.hadoop.hive.ql.exec.FunctionRegistry.getGenericUDAFEvaluator(FunctionRegistry.java:1043)
> at
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getGenericUDAFEvaluator(SemanticAnalyzer.java:4817)
> at
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genGroupByPlanMapGroupByOperator(SemanticAnalyzer.java:5482)
> at
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genGroupByPlanMapAggrNoSkew(SemanticAnalyzer.java:6496)
> at
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:10617)
> at
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:11557)
> at
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:11427)
> at
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genOPTree(SemanticAnalyzer.java:12229)
> at
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12319)
> at
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:11802)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)