Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-2425

Broadcast join hint not enforced when low memory limit is set.

    XMLWordPrintableJSON

Details

    Description

      When the query memory is low the Broadcast join hint is not enforced and a shuffle join is used

      set MEM_LIMIT=1536M;
      explain select count(*) from store_sales s1 join [broadcast] store_sales s2 on s1.ss_ticket_number=s2.ss_ticket_number;
      

      Plan

      +----------------------------------------------------------------------------+
      | Explain String                                                             |
      +----------------------------------------------------------------------------+
      | Estimated Per-Host Requirements: Memory=611.06MB VCores=2                  |
      |                                                                            |
      | 07:AGGREGATE [FINALIZE]                                                    |
      | |  output: count:merge(*)                                                  |
      | |  hosts=4 per-host-mem=unavailable                                        |
      | |  tuple-ids=2 row-size=8B cardinality=1                                   |
      | |                                                                          |
      | 06:EXCHANGE [UNPARTITIONED]                                                |
      | |  hosts=4 per-host-mem=unavailable                                        |
      | |  tuple-ids=2 row-size=8B cardinality=1                                   |
      | |                                                                          |
      | 03:AGGREGATE                                                               |
      | |  output: count(*)                                                        |
      | |  hosts=4 per-host-mem=10.00MB                                            |
      | |  tuple-ids=2 row-size=8B cardinality=1                                   |
      | |                                                                          |
      | 02:HASH JOIN [INNER JOIN, PARTITIONED]                                     |
      | |  hash predicates: s1.ss_ticket_number = s2.ss_ticket_number              |
      | |  hosts=4 per-host-mem=577.06MB                                           |
      | |  tuple-ids=0,1 row-size=16B cardinality=3137674198                       |
      | |                                                                          |
      | |--05:EXCHANGE [HASH(s2.ss_ticket_number)]                                 |
      | |  |  hosts=4 per-host-mem=0B                                              |
      | |  |  tuple-ids=1 row-size=8B cardinality=275041999                        |
      | |  |                                                                       |
      | |  01:SCAN HDFS [tpcds_bin_partitioned_parquet_100.store_sales s2, RANDOM] |
      | |     partitions=1823/1823 files=1823 size=14.29GB                         |
      | |     table stats: 275041999 rows total                                    |
      | |     column stats: all                                                    |
      | |     hosts=4 per-host-mem=24.00MB                                         |
      | |     tuple-ids=1 row-size=8B cardinality=275041999                        |
      | |                                                                          |
      | 04:EXCHANGE [HASH(s1.ss_ticket_number)]                                    |
      | |  hosts=4 per-host-mem=0B                                                 |
      | |  tuple-ids=0 row-size=8B cardinality=275041999                           |
      | |                                                                          |
      | 00:SCAN HDFS [tpcds_bin_partitioned_parquet_100.store_sales s1, RANDOM]    |
      |    partitions=1823/1823 files=1823 size=14.29GB                            |
      |    table stats: 275041999 rows total                                       |
      |    column stats: all                                                       |
      |    hosts=4 per-host-mem=24.00MB                                            |
      |    tuple-ids=0 row-size=8B cardinality=275041999                           |
      +----------------------------------------------------------------------------+
      

      Attachments

        Activity

          People

            anujphadke Anuj Phadke
            mmokhtar Mostafa Mokhtar
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: