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

Jesus Camacho Rodriguez commented on HIVE-15806:
------------------------------------------------

- The only post aggregator function that we can recognize in the Calcite side 
is _avg_, which should return a float type. FWIW, we cannot infer it coming 
from Hive yet, since we do not recognize _avg_ as a native function when we go 
into Calcite (SqlFunctionConverter). There is already a follow-up issue for 
this (HIVE-14587). Once we support more functions, there will more work to do 
there. I have added TODO comments in that part of the code.
- I have added a comment to the new patch specifying why it is needed for 
Select queries.

> Druid schema inference for Select queries might produce wrong type for metrics
> ------------------------------------------------------------------------------
>
>                 Key: HIVE-15806
>                 URL: https://issues.apache.org/jira/browse/HIVE-15806
>             Project: Hive
>          Issue Type: Bug
>          Components: Druid integration
>    Affects Versions: 2.2.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>         Attachments: HIVE-15806.01.patch, HIVE-15806.patch
>
>
> We inferred float automatically, instead of emitting a metadata query to 
> Druid and checking the type of the metric.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to