Skip to content
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

Test case for bug in RexBuilder.ensureType() function #97

Closed
wants to merge 1 commit into from

Conversation

mehant
Copy link
Contributor

@mehant mehant commented Jun 23, 2015

There seems to be a bug in RexBuilder.esnureType() function when we pass 'matchNullability' = false as a parameter. The underlying equals() function compares the digest of the two types and is not aware of the 'matchNullability'. So if the nullability differs the equals would return false and we end up adding an extra cast. Below is a unit test for this issue.

One solution to this issue can be adding equalsIgnoreNullability() to the RelDataType interface (while performing the comparison of digests ignoring the ' not null'). However since I am not well versed with this logic if there are other suggestions I can work on it to contributing a patch.

P.S: JIRA seems to be down so haven't tagged this PR with a JIRA#, will do that once its up.

@julianhyde
Copy link
Contributor

I have logged https://issues.apache.org/jira/browse/CALCITE-807 to track this.

@julianhyde
Copy link
Contributor

Can you please close this pull request? I added test case code to https://issues.apache.org/jira/browse/CALCITE-807.

@mehant mehant closed this Jul 24, 2015
pfzhan pushed a commit to pfzhan/calcite that referenced this pull request May 17, 2020
* ProjectToWindowRule - correct cohort dependence checking

* r21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants