You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Tim Armstrong (JIRA)" <ji...@apache.org> on 2018/10/30 17:23:00 UTC

[jira] [Updated] (IMPALA-1023) Select nodes missing from plans result in minor inefficiencies.

     [ https://issues.apache.org/jira/browse/IMPALA-1023?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Armstrong updated IMPALA-1023:
----------------------------------
    Issue Type: Improvement  (was: Bug)

> Select nodes missing from plans result in minor inefficiencies.
> ---------------------------------------------------------------
>
>                 Key: IMPALA-1023
>                 URL: https://issues.apache.org/jira/browse/IMPALA-1023
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Frontend
>    Affects Versions: Impala 1.3.1
>            Reporter: Alexander Behm
>            Priority: Minor
>
> Our predicate assignment/propagation sometimes omits predicates that could also be assigned in a Select node.
> The plans are still correct, i.e., the predicate don't simply disappear, but the plans could be more efficient with an additional Select node.
> For example, consider these queries and plans:
> {code}
> select a.int_col, b.bigint_col from
> (select id, int_col, bigint_col from functional.alltypes) b
> inner join
> (select id, int_col, bigint_col from functional.alltypes order by id limit 100) a
> on a.id = b.id
> where a.id > 10 and b.id > 20
> +-------------------------------------------------------------------------+
> | Explain String                                                          |
> +-------------------------------------------------------------------------+
> | Estimated Per-Host Requirements: Memory=160.00MB VCores=2               |
> |                                                                         |
> | 08:EXCHANGE [PARTITION=UNPARTITIONED]                                   |
> | |                                                                       |
> | 03:HASH JOIN [INNER JOIN, PARTITIONED]                                  |
> | |  hash predicates: id = id                                             |
> | |                                                                       |
> | |--07:EXCHANGE [PARTITION=HASH(id)]                                     |
> | |  |  limit: 100                                                        |
> | |  |                                                                    |
> | |  05:TOP-N [LIMIT=100]                                                 |
> | |  |  order by: id ASC                                                  |
> | |  |                                                                    |
> | |  04:EXCHANGE [PARTITION=UNPARTITIONED]                                |
> | |  |                                                                    |
> | |  02:TOP-N [LIMIT=100]                                                 |
> | |  |  order by: id ASC                                                  |
> | |  |                                                                    |
> | |  01:SCAN HDFS [functional.alltypes]                                   |
> | |     partitions=24/24 size=478.45KB                                    |
> | |                                                                       |
> | 06:EXCHANGE [PARTITION=HASH(id)]                                        |
> | |                                                                       |
> | 00:SCAN HDFS [functional.alltypes]                                      |
> |    partitions=24/24 size=478.45KB                                       |
> |    predicates: functional.alltypes.id > 10, functional.alltypes.id > 20 |
> +-------------------------------------------------------------------------+
> {code}
> Here's the same queries with the a and b tables flipped:
> {code}
> select a.int_col, b.bigint_col from
> (select id, int_col, bigint_col from functional.alltypes order by id limit 100) a
> inner join
> (select id, int_col, bigint_col from functional.alltypes) b
> on a.id = b.id
> where a.id > 10 and b.id > 20
> +-------------------------------------------------------------------------+
> | Explain String                                                          |
> +-------------------------------------------------------------------------+
> | Estimated Per-Host Requirements: Memory=160.00MB VCores=1               |
> |                                                                         |
> | 08:EXCHANGE [PARTITION=UNPARTITIONED]                                   |
> | |                                                                       |
> | 04:HASH JOIN [INNER JOIN, BROADCAST]                                    |
> | |  hash predicates: id = id                                             |
> | |                                                                       |
> | |--07:EXCHANGE [BROADCAST]                                              |
> | |  |                                                                    |
> | |  02:SELECT                                                            |
> | |  |  predicates: id > 10                                               |
> | |  |                                                                    |
> | |  06:TOP-N [LIMIT=100]                                                 |
> | |  |  order by: id ASC                                                  |
> | |  |                                                                    |
> | |  05:EXCHANGE [PARTITION=UNPARTITIONED]                                |
> | |  |                                                                    |
> | |  01:TOP-N [LIMIT=100]                                                 |
> | |  |  order by: id ASC                                                  |
> | |  |                                                                    |
> | |  00:SCAN HDFS [functional.alltypes]                                   |
> | |     partitions=24/24 size=478.45KB                                    |
> | |                                                                       |
> | 03:SCAN HDFS [functional.alltypes]                                      |
> |    partitions=24/24 size=478.45KB                                       |
> |    predicates: functional.alltypes.id > 10, functional.alltypes.id > 20 |
> +-------------------------------------------------------------------------+
> {code}



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

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