[
https://issues.apache.org/jira/browse/IMPALA-5821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16658462#comment-16658462
]
Greg Rahn commented on IMPALA-5821:
-----------------------------------
[~asherman] - For me, I find it most important to include the types/casts in
the predicate sections of the plan. For example, here is a Postgres example.
See the Filter section.
{code:sql}
grahn=# \d orders
Table "public.orders"
Column | Type | Collation | Nullable | Default
-------------------+--------+-----------+----------+---------
order_id | bigint | | |
order_date | bigint | | |
order_customer_id | bigint | | |
order_status | text | | |
grahn=# explain select * from orders where order_id = 10.0::float;
QUERY PLAN
-------------------------------------------------------------------
Seq Scan on orders (cost=0.00..1590.24 rows=344 width=34)
Filter: ((order_id)::double precision = '10'::double precision)
(2 rows)
{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]