@@ -1389,108 +1389,6 @@ physical_plan
1389
1389
14)------------------FilterExec: y@1 = x@0
1390
1390
15)--------------------DataSourceExec: partitions=1, partition_sizes=[1]
1391
1391
1392
- query IIII rowsort
1393
- SELECT * FROM
1394
- (SELECT x+1 AS col0, y+1 AS col1 FROM PAIRS WHERE x == y)
1395
- JOIN f
1396
- ON col0 = f.a
1397
- JOIN s
1398
- ON col1 = s.b
1399
- ----
1400
- 2 2 2 2
1401
- 3 3 3 3
1402
-
1403
- statement ok
1404
- set datafusion.optimizer.prefer_hash_selection_vector_partitioning = true;
1405
-
1406
- query TT
1407
- explain
1408
- SELECT * FROM
1409
- (SELECT x+1 AS col0, y+1 AS col1 FROM PAIRS WHERE x == y)
1410
- JOIN f
1411
- ON col0 = f.a
1412
- JOIN s
1413
- ON col1 = s.b
1414
- ----
1415
- logical_plan
1416
- 01)Inner Join: col1 = CAST(s.b AS Int64)
1417
- 02)--Inner Join: col0 = CAST(f.a AS Int64)
1418
- 03)----Projection: CAST(pairs.x AS Int64) + Int64(1) AS col0, CAST(pairs.y AS Int64) + Int64(1) AS col1
1419
- 04)------Filter: pairs.y = pairs.x
1420
- 05)--------TableScan: pairs projection=[x, y]
1421
- 06)----TableScan: f projection=[a]
1422
- 07)--TableScan: s projection=[b]
1423
- physical_plan
1424
- 01)CoalesceBatchesExec: target_batch_size=8192
1425
- 02)--HashJoinExec: mode=Partitioned, join_type=Inner, on=[(col1@1, CAST(s.b AS Int64)@1)], projection=[col0@0, col1@1, a@2, b@3]
1426
- 03)----ProjectionExec: expr=[col0@1 as col0, col1@2 as col1, a@0 as a]
1427
- 04)------CoalesceBatchesExec: target_batch_size=8192
1428
- 05)--------HashJoinExec: mode=Partitioned, join_type=Inner, on=[(CAST(f.a AS Int64)@1, col0@0)], projection=[a@0, col0@2, col1@3]
1429
- 06)----------CoalesceBatchesExec: target_batch_size=8192
1430
- 07)------------RepartitionExec: partitioning=HashSelectionVector([CAST(f.a AS Int64)@1], 16), input_partitions=1
1431
- 08)--------------ProjectionExec: expr=[a@0 as a, CAST(a@0 AS Int64) as CAST(f.a AS Int64)]
1432
- 09)----------------DataSourceExec: partitions=1, partition_sizes=[1]
1433
- 10)----------CoalesceBatchesExec: target_batch_size=8192
1434
- 11)------------RepartitionExec: partitioning=HashSelectionVector([col0@0], 16), input_partitions=16
1435
- 12)--------------ProjectionExec: expr=[CAST(x@0 AS Int64) + 1 as col0, CAST(y@1 AS Int64) + 1 as col1]
1436
- 13)----------------RepartitionExec: partitioning=RoundRobinBatch(16), input_partitions=1
1437
- 14)------------------CoalesceBatchesExec: target_batch_size=8192
1438
- 15)--------------------FilterExec: y@1 = x@0
1439
- 16)----------------------DataSourceExec: partitions=1, partition_sizes=[1]
1440
- 17)----CoalesceBatchesExec: target_batch_size=8192
1441
- 18)------RepartitionExec: partitioning=HashSelectionVector([CAST(s.b AS Int64)@1], 16), input_partitions=1
1442
- 19)--------ProjectionExec: expr=[b@0 as b, CAST(b@0 AS Int64) as CAST(s.b AS Int64)]
1443
- 20)----------DataSourceExec: partitions=1, partition_sizes=[1]
1444
-
1445
-
1446
- # TODO: It should be:
1447
- # 2 2 2 2
1448
- # 3 3 3 3
1449
- # After fix https://github.com/apache/datafusion/issues/15382
1450
- query IIII
1451
- SELECT * FROM
1452
- (SELECT x+1 AS col0, y+1 AS col1 FROM PAIRS WHERE x == y)
1453
- JOIN f
1454
- ON col0 = f.a
1455
- JOIN s
1456
- ON col1 = s.b
1457
- ----
1458
- 2 2 2 2
1459
- 3 3 3 3
1460
- 2 2 2 2
1461
- 3 3 3 3
1462
- 2 2 2 2
1463
- 3 3 3 3
1464
- 2 2 2 2
1465
- 3 3 3 3
1466
- 2 2 2 2
1467
- 3 3 3 3
1468
- 2 2 2 2
1469
- 3 3 3 3
1470
- 2 2 2 2
1471
- 3 3 3 3
1472
- 2 2 2 2
1473
- 3 3 3 3
1474
- 2 2 2 2
1475
- 3 3 3 3
1476
- 2 2 2 2
1477
- 3 3 3 3
1478
- 2 2 2 2
1479
- 3 3 3 3
1480
- 2 2 2 2
1481
- 3 3 3 3
1482
- 2 2 2 2
1483
- 3 3 3 3
1484
- 2 2 2 2
1485
- 3 3 3 3
1486
- 2 2 2 2
1487
- 3 3 3 3
1488
- 2 2 2 2
1489
- 3 3 3 3
1490
-
1491
- statement ok
1492
- set datafusion.optimizer.prefer_hash_selection_vector_partitioning = false;
1493
-
1494
1392
statement ok
1495
1393
drop table pairs;
1496
1394
0 commit comments