Jefffrey commented on issue #670:
URL:
https://github.com/apache/arrow-datafusion/issues/670#issuecomment-1405608034
Issue seems resolved now as of latest master:
```sql
DataFusion CLI v16.0.0
❯ CREATE EXTERNAL TABLE test STORED AS CSV WITH HEADER ROW LOCATION
'test.csv';
0 rows in set. Query took 0.011 seconds.
❯ SELECT
t1.c9 x
FROM test t1
INNER JOIN test t2
ON t1.c9 = t2.c9
ORDER BY x;
+---+
| x |
+---+
| 2 |
| 3 |
| 4 |
| 5 |
+---+
4 rows in set. Query took 0.013 seconds.
❯ SELECT
t1.c9 x, t1.c1 c1
FROM test t1
INNER JOIN test t2
ON t1.c9 = t2.c9
ORDER BY x;
+---+----+
| x | c1 |
+---+----+
| 2 | 1 |
| 3 | 2 |
| 4 | 3 |
| 5 | 4 |
+---+----+
4 rows in set. Query took 0.013 seconds.
❯ explain SELECT
t1.c9 x, t1.c1 c1
FROM test t1
INNER JOIN test t2
ON t1.c9 = t2.c9
ORDER BY x;
+---------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type | plan
|
+---------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| logical_plan | Sort: x ASC NULLS LAST
|
| | Projection: t1.c9 AS x, t1.c1 AS c1
|
| | Inner Join: t1.c9 = t2.c9
|
| | SubqueryAlias: t1
|
| | TableScan: test projection=[c1, c9]
|
| | SubqueryAlias: t2
|
| | TableScan: test projection=[c9]
|
| physical_plan | SortExec: [x@0 ASC NULLS LAST]
|
| | CoalescePartitionsExec
|
| | ProjectionExec: expr=[c9@1 as x, c1@0 as c1]
|
| | CoalesceBatchesExec: target_batch_size=8192
|
| | HashJoinExec: mode=Partitioned, join_type=Inner,
on=[(Column { name: "c9", index: 1 }, Column { name: "c9", index: 0 })]
|
| | CoalesceBatchesExec: target_batch_size=8192
|
| | RepartitionExec: partitioning=Hash([Column {
name: "c9", index: 1 }], 12), input_partitions=12
|
| | RepartitionExec:
partitioning=RoundRobinBatch(12), input_partitions=1
|
| | CsvExec: files={1 group:
[[home/jeffrey/Code/arrow-datafusion/datafusion-cli/test.csv]]},
has_header=true, limit=None, projection=[c1, c9] |
| | CoalesceBatchesExec: target_batch_size=8192
|
| | RepartitionExec: partitioning=Hash([Column {
name: "c9", index: 0 }], 12), input_partitions=12
|
| | RepartitionExec:
partitioning=RoundRobinBatch(12), input_partitions=1
|
| | CsvExec: files={1 group:
[[home/jeffrey/Code/arrow-datafusion/datafusion-cli/test.csv]]},
has_header=true, limit=None, projection=[c9] |
| |
|
+---------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set. Query took 0.010 seconds.
❯
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]