-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Test DataFusion 45.0.0 with Sail #14408
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
Comments
take |
I'd be curious if this could be narrowed down via git bisect. Probably would need a small script to do it and a quick test case |
I think this should be allowed, especially since we run further optimizations on the physical plans.
may have it's first union branch eventually eliminated at some point, and this may happen on the physical stage. As a result, nullable field becomes non-null. |
In terms of TPC-DS errors, I think we have tests for those queries as part of the regression tests https://github.com/apache/datafusion/blob/main/datafusion/core/tests/tpc-ds/66.sql Seems to pass on main (venv) andrewlamb@Andrews-MacBook-Pro-2:~/Software/datafusion$ cargo test --test tpcds_planning -- 66
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.17s
Running tests/tpcds_planning.rs (target/debug/deps/tpcds_planning-2ddd48cf45e9df2d)
running 2 tests
test tpcds_logical_q66 ... ok
test tpcds_physical_q66 ... ok
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 196 filtered out; finished in 0.23s
(venv) andrewlamb@Andrews-MacBook-Pro-2:~/Software/datafusion$ Maybe we can look into what is different in sail 🤔 |
@alamb This doesn't surprise me considering that Sail doesn't use SQLToRel. My concern isn't necessarily with TPC-DS 66, but rather the implications of this error. There is either some bug or break that has been surfaced by this test and we don't know the impact that this has. IMO it would be risky to do this release without further debugging this. I am available this evening to debug though. |
Not sure if this is the right file to be looking at, but it's where the error comes from ( |
It seems like the issue may be from 5 -- which now adds additional checks to catch errors earlier rather than later (for example now the error will happen during planning rather than when RecordBatchs are created during execution) So the question then in my mind is if the error is due to:
@findepi do you mean we should relax the check to ignore nullable / non nullable annotations? -- I think that would probably be ok too. @wiedld perhaps you have some comments here I think in general the split between what a Phyiscal optimizer is allowed to do / not (the "invariants" are not very clear). #13986 took a first step at formalizing them but maybe we have found other corner cases where it is not reasonable |
From my perspective it seems like all the tests in DataFusion are passing, so clearly we have some sort of test coverage / gap @shehabgamin I wonder if this would be a good time to add more tests that cover your usecase in Sail (or perhaps that would be part of adding Spark functions as discussed in #5600) 🤔 |
@findepi @alamb I Just confirmed that this fixes TPC-DS
@alamb I agree this would add value. While Spark function test coverage is a starting point, I believe what we're looking for here is broader. I'm not entirely sure about the best approach yet, but I suspect Sail's pattern of catching these bugs/breaks stems from not using DataFusion out-of-the-box. For example, in the TPC-DS P.S. I'm recovering from a harsh cold so sorry if I'm not making much sense lol |
Yes, we have a similar issue downstream in InfluxDB IOx as well (we make extensive use of the DataFusion APIs and so often find bugs that are not covered by existing tests in DataFusion) What we have tried to do is to add the appropriate test coverage for such issues when we find them, though what "appropriate" means varies case by case
That is one approach for sure. If there is a broader pattern of how Sail is creating / using Logical Plans too that we could get tested that would also help a lot.
|
Since we have released DF 45 I think we can claim the testing is complete |
Is your feature request related to a problem or challenge?
We would like to make sure that DataFusion 45.0.0 works with Sail before creating the release candidate.
Describe the solution you'd like
All CI tests should pass in a PR that upgrades to DataFusion 45.
Current PR:
lakehq/sail#365
Current issues being investigated:
Test 1: Commit
68e372f
(DataFusion main)1. Derived TPC-DS Query 66 fails on Sail, when it previously did not.
2. Another regression is that implementing the
is_nullable
function in theScalarUDFImpl
trait no longer works. For example:Digging into the code, I see that it's deprecated (it should still work even though it's deprecated). What's strange, however, is that the deprecation warning is not propagating to me as a downstream user. I only found this out due to a failed test.
Test 2: Commit
26058ac
(DataFusion45.0.0-rc1
)1. Derived TPC-DS Query 66 still failing, with same error.
2. Same issue still. I ended up removing
is_nullable
and implementingreturn_type_from_args
. This seems to be a breaking change rather thanis_nullable
simply being deprecated.Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: