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

Andrew Sherman commented on IMPALA-5821:
----------------------------------------

[~grahn] This jira is in code review but I want to check some language with you.
 In the extended explain output the newly emitted sql text is prefixed with the 
string "Query with implicit casts:"
 Does that sound OK?

Example output:
{code:java}
[localhost:21000] default> set explain_level=2;
EXPLAIN_LEVEL set to 2
[localhost:21000] default> explain select * from functional_kudu.alltypestiny 
where bigint_col < 1000 / 100;
Query: explain select * from functional_kudu.alltypestiny where bigint_col < 
1000 / 100
Query with implicit casts: SELECT * FROM functional_kudu.alltypestiny WHERE 
CAST(bigint_col AS DOUBLE) < CAST(10 AS DOUBLE)
Max Per-Host Resource Reservation: Memory=0B Threads=2
Per-Host Resource Estimates: Memory=10MB
Codegen disabled by planner
""
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
|  Per-Host Resources: mem-estimate=4.88MB mem-reservation=0B 
thread-reservation=2
PLAN-ROOT SINK
|  mem-estimate=0B mem-reservation=0B thread-reservation=0
|
00:SCAN KUDU [functional_kudu.alltypestiny]
   predicates: bigint_col < 10
   mem-estimate=4.88MB mem-reservation=0B thread-reservation=1
   tuple-ids=0 row-size=97B cardinality=1
   in pipelines: 00(GETNEXT)
Fetched 15 row(s) in 0.08s
{code}

> 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
>            Assignee: Andrew Sherman
>            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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to