[CALCITE-4099] Unify Strong.Policy and NullPolicy#4630
Draft
zabetak wants to merge 1 commit intoapache:mainfrom
Draft
[CALCITE-4099] Unify Strong.Policy and NullPolicy#4630zabetak wants to merge 1 commit intoapache:mainfrom
zabetak wants to merge 1 commit intoapache:mainfrom
Conversation
1. Deprecate Strong.Policy in favor of NullPolicy 2. Add NullPolicy.NEVER for describing operators that never return null 3. Replace Strong.Policy with NullPolicy using the following mapping: Strong.Policy.ANY -> NullPolicy.STRICT Strong.Policy.AS_IS -> NullPolicy.NONE Strong.Policy.CUSTOM -> NullPolicy.NONE Strong.Policy.NOT_NULL -> NullPolicy.NEVER essentially AS_IS and CUSTOM are now handled in the same way. 4. Deprecate APIs using/returning Strong.Policy 5. Use NullPolicy mapping from RexImpTable as the primary source of truth 6. Modify NullPolicy for IsXx, NOT, and CAST operators in RexImpTable to be aligned with desired behavior 7. Define fallback mapping using SqlKind in Strong.Policy for projects that define their own operators (most likely will drop that) 8. Hardcode policy for some operators not defined in RexImpTable failing the assertion in SqlOperator#getNullPolicy 9. Update plan/sql in JdbcAdapterTest#testUnknownColumn which changes from LEFT JOIN to INNER JOIN due FilterJoinRule and in particular RelOptUtil#simplifyJoin since the CONCAT operator is now defined as STRICT so we can infer that the filter would reject nulls and thus we are able to simplify.
Contributor
|
This is draft, please ask for a review when you think it's ready for review. |
|
|
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 90 days 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@calcite.apache.org list. Thank you for your contributions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Strong.Policy.AS_IS -> NullPolicy.NONE
Strong.Policy.CUSTOM -> NullPolicy.NONE
Strong.Policy.NOT_NULL -> NullPolicy.NEVER
essentially AS_IS and CUSTOM are now handled in the same way.