[
https://issues.apache.org/jira/browse/CALCITE-2326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16633463#comment-16633463
]
Vladimir Sitnikov commented on CALCITE-2326:
--------------------------------------------
[~julianhyde], you seem to use a wrong issue.
This issue's description seems to be regarding "IS TRUE" / "IS FALSE" / etc
predicates, however your key change is regarding "unknownAs".
Adding a mandatory parameter to PUBLIC {{simplify}} methods does not look right
to me.
I'm fine if that was private-only, however adding explicit parameter does look
awful since:
1) Clients would have lots of "used deprecated methods"
2) We won't be able to remove old methods (2.0 is nowhere near)
3) 90% (or so) usages of the methods pass UNKNOWN as the parameter. Is it
really important to have that parameter as a mandatory one? I think it is just
fine to have {{simplify(RexNode)}} API and use
{{withUnknownAs(...).simplify(RexNode)}} when special handling for unknown is
required.
{quote}Add test helper method checkSimplify3 that checks simplification for
unknownAs UNKNOWN, FALSE, TRUE. checkSimplify2 calls it, assuming that the
result for TRUE is the same as UNKNOWN.{quote}
Please make sure that error message makes it clear WHAT was the test case
without looking at the source code.
{quote} It is not perfect, but it is progress{quote}
Do you think your branch unlocks unknownAsTrue mode?
If so, please add unknownAsTrue to fuzzer test as well.
> Generalize p(x) IS TRUE/FALSE/UNKNOWN handling in RexSimplify
> -------------------------------------------------------------
>
> Key: CALCITE-2326
> URL: https://issues.apache.org/jira/browse/CALCITE-2326
> Project: Calcite
> Issue Type: Improvement
> Reporter: Zoltan Haindrich
> Assignee: Zoltan Haindrich
> Priority: Major
>
> Currently only IS TRUE is handle by the unknownAsFalse field variable.
> The main goal would be to extend the logic to also handle IS FALSE cases (and
> possibly IS UNKNOWN too)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)