Looks like https://issues.apache.org/jira/browse/IMPALA-4857 . If there are
rows with duplicate keys on the right side of a hash join, we have to be
able to fit all rows for a key in memory to process it.

I think we could avoid the problem by modifying the test so that it's
joining on a column with a NDV > 1. that would allow spilling. I.e. instead
of "select 1" below, make it "select int_col % 100" or similar.

# Regression test for IMPALA-2256. Join whose right side has very high
# cardinality (121M) and zero materialized slots.
SELECT straight_join
COUNT(*) FROM alltypesagg t1
WHERE t1.int_col IN (
 SELECT 1 FROM alltypesagg t1
 CROSS JOIN alltypesagg t2)


On Fri, Feb 23, 2018 at 10:07 AM, Philip Zeyliger <[email protected]>
wrote:

> Hi folks,
>
> I'm curious if the following error looks familiar to folks. I'm running
> exhaustive tests on a 32 GB machine with a slightly lowered impalad
> memlimit and am pretty much up to date
> (commit 623ace0e4c84297606d13f321bd2ceee70a8b9f2 plus the memlimit
> change).
>
> Thanks!
>
> -- Philip
>
>
>
> 2018-02-23 06:40:58 =================================== FAILURES
> ===================================
> 2018-02-23 06:40:58
> TestSemiJoinQueries.test_semi_joins_exhaustive[batch_size: 0 |
> exec_option:
> {'batch_size': 0, 'num_nodes': 0, 'disable_codegen_rows_threshold': 0,
> 'disable_codegen': True, 'abort_on_error': 1,
> 'exec_single_node_rows_threshold': 0} | table_format: parquet/none]
> 2018-02-23 06:40:58 [gw2] linux2 -- Python 2.7.12
> /home/philip/src/Impala/bin/../infra/python/env/bin/python
> 2018-02-23 06:40:58 query_test/test_join_queries.py:176: in
> test_semi_joins_exhaustive
> 2018-02-23 06:40:58
>  self.run_test_case('QueryTest/semi-joins-exhaustive', new_vector)
> 2018-02-23 06:40:58 common/impala_test_suite.py:397: in run_test_case
> 2018-02-23 06:40:58     result =
> self.__execute_query(target_impalad_client, query, user=user)
> 2018-02-23 06:40:58 common/impala_test_suite.py:612: in __execute_query
> 2018-02-23 06:40:58     return impalad_client.execute(query, user=user)
> 2018-02-23 06:40:58 common/impala_connection.py:160: in execute
> 2018-02-23 06:40:58     return self.__beeswax_client.execute(sql_stmt,
> user=user)
>
>
>                                                                  2018-02-23
> 06:40:58 beeswax/impala_beeswax.py:173: in execute
>
>
>
>                                                  2018-02-23 06:40:58
>  handle = self.__execute_query(query_string.strip(), user=user)
> 2018-02-23 06:40:58 beeswax/impala_beeswax.py:341: in __execute_query
> 2018-02-23 06:40:58     self.wait_for_completion(handle)
>
>
>
>                                                             2018-02-23
> 06:40:58 beeswax/impala_beeswax.py:361: in wait_for_completion
> 2018-02-23 06:40:58     raise ImpalaBeeswaxException("Query aborted:" +
> error_log, None)
> 2018-02-23 06:40:58 E   ImpalaBeeswaxException: ImpalaBeeswaxException:
>
>
>
>                                                              2018-02-23
> 06:40:58 E    Query aborted:Cannot perform hash join at node with id 4.
> Repartitioning did not reduce the size of a spilled partition.
> Repartitioning level 1. Number of rows 121000000:
>
>
>  2018-02-23 06:40:58 E   PartitionedHashJoinNode (id=4 op=2
> state=RepartitioningBuild #spilled_partitions=0)
> 2018-02-23 06:40:58 E   PhjBuilder: Hash partitions: 16:
> 2018-02-23 06:40:58 E    Hash partition 0 <Partition>: ptr=0xbc57ac0 Closed
> 2018-02-23 06:40:58 E    Hash partition 1 <Partition>: ptr=0xad6cb60
> Spilled
> 2018-02-23 06:40:58 E       Build Rows: 121000000 (Bytes pinned: 0)
> 2018-02-23 06:40:58 E
> 2018-02-23 06:40:58 E    Hash partition 2 <Partition>: ptr=0x131fa5c0
> Closed
> 2018-02-23 06:40:58 E    Hash partition 3 <Partition>: ptr=0x131fb760
> Closed
> 2018-02-23 06:40:58 E    Hash partition 4 <Partition>: ptr=0xad6ddc0
> Closed
>
>
>
>  2018-02-23 06:40:58 E    Hash partition 5 <Partition>: ptr=0xad6c340
> Closed
> 2018-02-23 06:40:58 E    Hash partition 6 <Partition>: ptr=0xad6c1e0 Closed
> 2018-02-23 06:40:58 E    Hash partition 7 <Partition>: ptr=0xad6d700 Closed
> 2018-02-23 06:40:58 E    Hash partition 8 <Partition>: ptr=0xad6ca20 Closed
> 2018-02-23 06:40:58 E    Hash partition 9 <Partition>: ptr=0xad6d4c0 Closed
> 2018-02-23 06:40:58 E    Hash partition 10 <Partition>: ptr=0xad6df80
> Closed
> 2018-02-23 06:40:58 E    Hash partition 11 <Partition>: ptr=0xad6d300
> Closed
>
>
>
> 2018-02-23 06:40:58 E    Hash partition 12 <Partition>: ptr=0xad6c420
> Closed
> 2018-02-23 06:40:58 E    Hash partition 13 <Partition>: ptr=0x1187f7a0
> Closed
> 2018-02-23 06:40:58 E    Hash partition 14 <Partition>: ptr=0x1187e200
> Closed
> 2018-02-23 06:40:58 E    Hash partition 15 <Partition>: ptr=0xad6cf00
> Closed
> 2018-02-23 06:40:58 E   Probe hash partitions: 0:
> 2018-02-23 06:40:58 E   InputPartition: 0x19dc64860
> 2018-02-23 06:40:58 E      Build Partition Closed
> 2018-02-23 06:40:58 E      Spilled Probe Rows: 248
> 2018-02-23 06:40:58 E
>
>
>
>                                                              2018-02-23
> 06:40:58 E   <BufferPool::Client> 0x124d5548 internal state:
> {<BufferPool::Client> 0xb306c40 name: HASH_JOIN_NODE id=4 ptr=0x124d5400
> write_status:  buffers allocated 0 num_pages: 2 pinned_bytes: 2097152
> dirty_unpinned_bytes: 0 in_flight_write_bytes: 0 reservation:
> {<ReservationTracker>: reservation_limit 9223372036854775807 reservation
> 6272581632 used_reservation 2097152 child_reservations 2097152 parent:
>
>
>
>
> 2018-02-23 06:40:58 E   <ReservationTracker>: reservation_limit
> 9223372036854775807 reservation 6272581632 used_reservation 0
> child_reservations 6272581632 parent:
>
>
>            2018-02-23 06:40:58 E   <ReservationTracker>: reservation_limit
> 6273807482 reservation 6272581632 used_reservation 0 child_reservations
> 6272581632 parent:
> 2018-02-23 06:40:58 E   <ReservationTracker>: reservation_limit 6665912320
> reservation 6356467712 used_reservation 0 child_reservations 6356467712
> parent:
>
>
> 2018-02-23 06:40:58 E   NULL}
> 2018-02-23 06:40:58 E     1 pinned pages: <BufferPool::Page> 0x9ba94a0 len:
> 2097152 pin_count: 1 buf: <BufferPool::BufferHandle> 0x9ba9518 client:
> 0x124d5548/0xb306c40 data: 0x14a00000 len: 2097152
> 2018-02-23 06:40:58 E
> 2018-02-23 06:40:58 E     0 dirty unpinned pages:
> 2018-02-23 06:40:58 E     0 in flight write pages: }
> 2018-02-23 06:40:58 ----------------------------- Captured stderr call
> -----------------------------
>

Reply via email to