You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "parkma99 (via GitHub)" <gi...@apache.org> on 2023/06/20 14:43:43 UTC

[GitHub] [arrow-datafusion] parkma99 commented on pull request #6708: Minor: `derive(Debug)` for `Expr`

parkma99 commented on PR #6708:
URL: https://github.com/apache/arrow-datafusion/pull/6708#issuecomment-1598930658

   > So I had a quick look at the outputs: I think the changes to the sqllogictests (e.g. `on=[(Column { name: "t1_id", index: 0 }, Column { name: "t2_id", index: 0 })]` => `on=[(t1_id@0, t2_id@0)]`) are desired. The new output is way easier to read and matches the formatting that we use for other plan formatting. Please update the tests accordingly.
   
   Ok
   
   > [SQL] explain select * from hashjoin_datatype_table_t1 t1 right join hashjoin_datatype_table_t2 t2 on t1.c3 = t2.c3
   [Diff] (-expected|+actual)
       logical_plan
       Right Join: CAST(t1.c3 AS Decimal128(10, 2)) = t2.c3
       --SubqueryAlias: t1
       ----TableScan: hashjoin_datatype_table_t1 projection=[c1, c2, c3, c4]
       --SubqueryAlias: t2
       ----TableScan: hashjoin_datatype_table_t2 projection=[c1, c2, c3, c4]
       physical_plan
       ProjectionExec: expr=[c1@0 as c1, c2@1 as c2, c3@2 as c3, c4@3 as c4, c1@5 as c1, c2@6 as c2, c3@7 as c3, c4@8 as c4]
   -   --SortMergeJoin: join_type=Right, on=[(Column { name: "CAST(t1.c3 AS Decimal128(10, 2))", index: 4 }, Column { name: "c3", index: 2 })]
   -   ----SortExec: expr=[CAST(t1.c3 AS Decimal128(10, 2))@4 ASC]
   +   --SortMergeJoin: join_type=Right, on=[(Cast(Cast { expr: Column(Column { relation: Some(Bare { table: "t1" }), name: "c3" }), data_type: Decimal128(10, 2) })@4, c3@2)]
   +   ----SortExec: expr=[Cast(Cast { expr: Column(Column { relation: Some(Bare { table: "t1" }), name: "c3" }), data_type: Decimal128(10, 2) })@4 ASC]
       ------CoalesceBatchesExec: target_batch_size=4096
   -   --------RepartitionExec: partitioning=Hash([Column { name: "CAST(t1.c3 AS Decimal128(10, 2))", index: 4 }], 2), input_partitions=2
   -   ----------ProjectionExec: expr=[c1@0 as c1, c2@1 as c2, c3@2 as c3, c4@3 as c4, CAST(c3@2 AS Decimal128(10, 2)) as CAST(t1.c3 AS Decimal128(10, 2))]
   +   --------RepartitionExec: partitioning=Hash([Cast(Cast { expr: Column(Column { relation: Some(Bare { table: "t1" }), name: "c3" }), data_type: Decimal128(10, 2) })@4], 2), input_partitions=2
   +   ----------ProjectionExec: expr=[c1@0 as c1, c2@1 as c2, c3@2 as c3, c4@3 as c4, CAST(c3@2 AS Decimal128(10, 2)) as Cast(Cast { expr: Column(Column { relation: Some(Bare { table: "t1" }), name: "c3" }), data_type: Decimal128(10, 2) })]
       ------------RepartitionExec: partitioning=RoundRobinBatch(2), input_partitions=1
       --------------MemoryExec: partitions=1, partition_sizes=[1]
       ----SortExec: expr=[c3@2 ASC]
       ------CoalesceBatchesExec: target_batch_size=4096
       --------RepartitionExec: partitioning=Hash([c3@2], 2), input_partitions=2
       ----------RepartitionExec: partitioning=RoundRobinBatch(2), input_partitions=1
       ------------MemoryExec: partitions=1, partition_sizes=[1]
   at tests/sqllogictests/test_files/joins.slt:2672
   
   Case 2 I find the reason. I will update right now.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org