You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "l4wei (via GitHub)" <gi...@apache.org> on 2024/05/27 09:21:24 UTC
[PR] [CALCITE-6422] RexLiteral.isNullLiteral should be applied before RexLiteral.booleanValue in SubstitutionVisitor.mayBeSatisfiable [calcite]
l4wei opened a new pull request, #3800:
URL: https://github.com/apache/calcite/pull/3800
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6422] Query with '<>' throws NullPointerException during materialized view matching [calcite]
Posted by "mihaibudiu (via GitHub)" <gi...@apache.org>.
mihaibudiu merged PR #3800:
URL: https://github.com/apache/calcite/pull/3800
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6422] RexLiteral.isNullLiteral should be applied before RexLiteral.booleanValue in SubstitutionVisitor.mayBeSatisfiable [calcite]
Posted by "mihaibudiu (via GitHub)" <gi...@apache.org>.
mihaibudiu commented on PR #3800:
URL: https://github.com/apache/calcite/pull/3800#issuecomment-2142480784
You need to squash the commits for the PR to be merged.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6422] RexLiteral.isNullLiteral should be applied before RexLiteral.booleanValue in SubstitutionVisitor.mayBeSatisfiable [calcite]
Posted by "l4wei (via GitHub)" <gi...@apache.org>.
l4wei commented on PR #3800:
URL: https://github.com/apache/calcite/pull/3800#issuecomment-2138555765
@YiwenWu Can you merge this PR into main branch?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6422] RexLiteral.isNullLiteral should be applied before RexLiteral.booleanValue in SubstitutionVisitor.mayBeSatisfiable [calcite]
Posted by "YiwenWu (via GitHub)" <gi...@apache.org>.
YiwenWu commented on code in PR #3800:
URL: https://github.com/apache/calcite/pull/3800#discussion_r1617310267
##########
core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java:
##########
@@ -443,7 +443,8 @@ public static boolean mayBeSatisfiable(RexNode e) {
for (RexNode disjunction : disjunctions) {
switch (disjunction.getKind()) {
case LITERAL:
- if (!RexLiteral.booleanValue(disjunction)) {
+ if (!RexLiteral.isNullLiteral(disjunction)
Review Comment:
A question: Is it reasonable to generate null value?
I'm not sure whether the null value is caused by the error handling of the following method
```
final RexNode viewPred =
RexUtil.swapTableColumnReferences(rexBuilder, targetPreds.right,
sourceToTargetTableMapping.inverse(),
sourceEC.getEquivalenceClassesMap());
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6422] RexLiteral.isNullLiteral should be applied before RexLiteral.booleanValue in SubstitutionVisitor.mayBeSatisfiable [calcite]
Posted by "mihaibudiu (via GitHub)" <gi...@apache.org>.
mihaibudiu commented on PR #3800:
URL: https://github.com/apache/calcite/pull/3800#issuecomment-2142482104
Also, your PR and your commit should use the same message as the JIRA issue title.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6422] RexLiteral.isNullLiteral should be applied before RexLiteral.booleanValue in SubstitutionVisitor.mayBeSatisfiable [calcite]
Posted by "YiwenWu (via GitHub)" <gi...@apache.org>.
YiwenWu commented on PR #3800:
URL: https://github.com/apache/calcite/pull/3800#issuecomment-2141105631
> @YiwenWu Can you merge this PR into main branch if you approve this PR?
I currently do not have merge permissions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6422] Query with '<>' throws NullPointerException during materialized view matching [calcite]
Posted by "l4wei (via GitHub)" <gi...@apache.org>.
l4wei commented on PR #3800:
URL: https://github.com/apache/calcite/pull/3800#issuecomment-2143460851
@mihaibudiu Sure, you are right, I have followed you advices.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6422] RexLiteral.isNullLiteral should be applied before RexLiteral.booleanValue in SubstitutionVisitor.mayBeSatisfiable [calcite]
Posted by "l4wei (via GitHub)" <gi...@apache.org>.
l4wei commented on PR #3800:
URL: https://github.com/apache/calcite/pull/3800#issuecomment-2138555267
@YiwenWu Can you merge this PR into main branch?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6422] RexLiteral.isNullLiteral should be applied before RexLiteral.booleanValue in SubstitutionVisitor.mayBeSatisfiable [calcite]
Posted by "YiwenWu (via GitHub)" <gi...@apache.org>.
YiwenWu commented on code in PR #3800:
URL: https://github.com/apache/calcite/pull/3800#discussion_r1617310267
##########
core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java:
##########
@@ -443,7 +443,8 @@ public static boolean mayBeSatisfiable(RexNode e) {
for (RexNode disjunction : disjunctions) {
switch (disjunction.getKind()) {
case LITERAL:
- if (!RexLiteral.booleanValue(disjunction)) {
+ if (!RexLiteral.isNullLiteral(disjunction)
Review Comment:
A problem: Is it reasonable to generate null value?
I'm not sure whether the null value is caused by the error handling of the following method
```
final RexNode viewPred =
RexUtil.swapTableColumnReferences(rexBuilder, targetPreds.right,
sourceToTargetTableMapping.inverse(),
sourceEC.getEquivalenceClassesMap());
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6422] RexLiteral.isNullLiteral should be applied before RexLiteral.booleanValue in SubstitutionVisitor.mayBeSatisfiable [calcite]
Posted by "l4wei (via GitHub)" <gi...@apache.org>.
l4wei commented on code in PR #3800:
URL: https://github.com/apache/calcite/pull/3800#discussion_r1618110308
##########
core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java:
##########
@@ -443,7 +443,8 @@ public static boolean mayBeSatisfiable(RexNode e) {
for (RexNode disjunction : disjunctions) {
switch (disjunction.getKind()) {
case LITERAL:
- if (!RexLiteral.booleanValue(disjunction)) {
+ if (!RexLiteral.isNullLiteral(disjunction)
Review Comment:
I see, the null value is generated by following method:

And the nullAs is UNKNOWN in materialized view matching.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org