ygf11 commented on code in PR #4666:
URL: https://github.com/apache/arrow-datafusion/pull/4666#discussion_r1053069863
##########
datafusion/core/tests/sql/joins.rs:
##########
@@ -1448,11 +1448,11 @@ async fn hash_join_with_decimal() -> Result<()> {
let state = ctx.state();
let plan = state.optimize(&plan)?;
let expected = vec![
- "Explain [plan_type:Utf8, plan:Utf8]",
- " Projection: t1.c1, t1.c2, t1.c3, t1.c4, t2.c1, t2.c2, t2.c3, t2.c4
[c1:Date32;N, c2:Date64;N, c3:Decimal128(5, 2);N, c4:Dictionary(Int32, Utf8);N,
c1:Date32;N, c2:Date64;N, c3:Decimal128(10, 2);N, c4:Dictionary(Int32,
Utf8);N]",
- " Right Join: t1.c3 = t2.c3 [c1:Date32;N, c2:Date64;N, c3:Decimal128(5,
2);N, c4:Dictionary(Int32, Utf8);N, c1:Date32;N, c2:Date64;N, c3:Decimal128(10,
2);N, c4:Dictionary(Int32, Utf8);N]",
Review Comment:
No, it succeeded without type coercion, but I think it is a coincidence.
The reason is for `decimal eq` operation, we only check value, but do not
check the `precision` and `scale` are same.
In this test, the each c3 of the matched two rows has the same value --
`789000` and `-12312`, then it succeeded without type coercion.
--
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]