Skip to content

[CALCITE-2292] Query result is wrong when table is implemented with F…#1182

Merged
hsyuan merged 1 commit intoapache:masterfrom
chunweilei:wrong_result_2292
Apr 29, 2019
Merged

[CALCITE-2292] Query result is wrong when table is implemented with F…#1182
hsyuan merged 1 commit intoapache:masterfrom
chunweilei:wrong_result_2292

Conversation

@chunweilei
Copy link
Contributor

…ilterableTable and the sql has multiple where conditions

JIRA: https://issues.apache.org/jira/browse/CALCITE-2292.

…ilterableTable and the sql has multiple where conditions
case IS_NOT_NULL:
return NullAs.IS_NULL;
default:
return nullAs;
Copy link
Contributor Author

@chunweilei chunweilei Apr 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this change, the generated code for conditions like name like 'ss' and name not like 'xx' is
inp1_ == null || inp1_ != null ? (Boolean) null : Boolean.TRUE)
which is wrong because it always return null.
After this change it becomes
inp1_ == null ? (Boolean) null : Boolean.TRUE.

@chunweilei
Copy link
Contributor Author

@hsyuan @zabetak , could you please review this PR? Thanks~~

Copy link
Member

@hsyuan hsyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@hsyuan hsyuan merged commit 20dbd23 into apache:master Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants