-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sqllogictest] Move decimal.rs
tests
#5086
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @melgenek -- I reviewed all the tests and it seems like they were ported correctly
I left a comment about how to port the precision / type checking as well, but I think that could easily be done as a follow on PR as well
fyi @liukun4515
// array decimal(10,6) + scalar decimal(20,0) => decimal(21,6) | ||
assert_eq!( | ||
&DataType::Decimal128(27, 6), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that the comment expects a precision 21
, but the assertion is 27
. I am not sure if it's a typo in the comment, or if something is wrong with the type. I moved this test to decimal.slt
as is.
select arrow_typeof(abs(c1)) from decimal_simple limit 1; | ||
---- | ||
Float64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original test didn't check the type of abs
, but I added a test entry for it. It seems like a bug to me. Decimal(10,6)
was converted to a Float64
as a result of abs
call. It is probably related to #1335.
@alamb I updated this pr to include the type checks in sqllogictests using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great -- thank you @melgenek
It is wonderful to see the momentum / cleanup going into the tests. I very much appreciate your efforts and I hope other members of the community will appreciate the development improvements that come from this work
Benchmark runs are scheduled for baseline = 3da801d and contender = 69678d5. 69678d5 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Which issue does this PR close?
Part of #4495
Rationale for this change
Data-driven tests could be described in sqllogictest.
What changes are included in this PR?
Moves the tests that expect results from
decimal.rs
to sqllogictest.Are these changes tested?
Github actions sqllogictest job.
Are there any user-facing changes?
No.