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

Tim Armstrong commented on IMPALA-5821:
---------------------------------------

Talked with Greg. The idea is to solve a bigger class of problems by printing 
explicit casts in explain plans with level >= EXTENDED wherever it's currently 
ambiguous:
* Where an implicit cast is inserted by the frontend
* With numeric types where literals of different types may be printed in the 
same way
* Null literals?

This makes it easier to understand exactly what query execution will do when 
looking at a profile. The advantage of using the cast syntax is that the output 
will still be a valid expression.

> Distinguish numeric types and show implicit cast in EXTENDED explain plans
> --------------------------------------------------------------------------
>
>                 Key: IMPALA-5821
>                 URL: https://issues.apache.org/jira/browse/IMPALA-5821
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Frontend
>    Affects Versions: Impala 2.8.0
>            Reporter: Matthew Jacobs
>            Priority: Minor
>              Labels: supportability, usability
>
> In this plan, it wasn't clear that the constant in the predicate was being 
> evaluated to a double. Then the lhs required an implicit cast, and the 
> predicate couldn't be pushed to Kudu:
> {code}
> [localhost:21000] > explain select * from functional_kudu.alltypestiny where 
> bigint_col < 1000 / 100;
> Query: explain select * from functional_kudu.alltypestiny where bigint_col < 
> 1000 / 100
> +---------------------------------------------+
> | Explain String                              |
> +---------------------------------------------+
> | Per-Host Resource Reservation: Memory=0B    |
> | Per-Host Resource Estimates: Memory=10.00MB |
> | Codegen disabled by planner                 |
> |                                             |
> | PLAN-ROOT SINK                              |
> | |                                           |
> | 00:SCAN KUDU [functional_kudu.alltypestiny] |
> |    predicates: bigint_col < 10              |
> +---------------------------------------------+
> {code}
> We should make it more clear by printing it in a way that makes it clear that 
> it's being interpreted as a DOUBLE, e.g. by wrapping in a cast.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to