-
Notifications
You must be signed in to change notification settings - Fork 4.5k
COALESCE should infer correct non-null return type
#24249
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
Conversation
f21ca82 to
7550cae
Compare
|
Assigning reviewers. If you would like to opt out of this review, comment R: @robertwb for label java. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
|
R: @damccorm I'm struggling to get the tests to run locally on an M1 MacBook so was hoping to be able to use the CI to demonstrate the issue. But it looks like the extensions unit tests don't run by default. |
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control |
|
From the conversation in https://issues.apache.org/jira/browse/BEAM-7610 and related PRs, this should have been fixed by #14146 @apilloud could you take a look at this one since you have more context here? |
It's an issue we're definitely having in Dataflow SQL. A query which looks roughly like this: results in an error downstream which says that Data Catalog does not support |
|
In fact, does the basic test not prove that this is still broken? Lines 458 to 476 in cf56af2
Given that the final value of the |
|
This is another important detail for our particular query: according to the ZetaSQL spec[1] a [1] https://github.com/google/zetasql/blob/master/docs/data-types.md#nulls-and-the-array-type |
|
Sorry, I wasn't clear. I'm not making a claim about whether or not this is actively an issue; I was just saying that given the conversation around the calcite upgrade I'm surprised that it is still a problem. I would have expected that upgrade to fix the problem given my loose understanding of the issue |
Codecov Report
@@ Coverage Diff @@
## master #24249 +/- ##
=======================================
Coverage 73.46% 73.46%
=======================================
Files 714 714
Lines 96497 96497
=======================================
Hits 70889 70889
Misses 24286 24286
Partials 1322 1322
Flags with carried forward coverage won't be shown. Click here to find out more. 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
Looks like Andrew is on vacation, @kileys could you weigh in here? |
|
Your new test is running in the SQL Precommit and passing: https://ci-beam.apache.org/job/beam_PreCommit_SQL_Commit/5807/testReport/org.apache.beam.sdk.extensions.sql.zetasql/ZetaSqlDialectSpecTest/testCoalesceNotNull/ Beam ZetaSQL has significant issues with null handling, so an issue like this existing wouldn't surprise me. I think you need a schema that supports nullable fields though? Try this: The latest release of Dataflow SQL is based on df6efe3 (somewhere between v2.38.0 and v2.39.0), which is several months old so it is possible that it has been fixed since. I know #17387 is more recent, which fixes some null bugs. Possibly try rebasing on that commit? |
|
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions. |
I think this is still an issue. |
|
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions. |
|
This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time. |
#19730
This is adding a test to demonstrate that the issue still exists and needs fixing. I'm yet to identify a fix.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username).addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.