-
Notifications
You must be signed in to change notification settings - Fork 186
Add Flow control function IF(expr1, expr2, expr3) #990
Add Flow control function IF(expr1, expr2, expr3) #990
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #990 +/- ##
==========================================
Coverage 99.87% 99.87%
- Complexity 2400 2406 +6
==========================================
Files 234 234
Lines 5517 5524 +7
Branches 357 357
==========================================
+ Hits 5510 5517 +7
Misses 5 5
Partials 2 2
Continue to review full report at Codecov.
|
...zon/opendistroforelasticsearch/sql/expression/operator/predicate/UnaryPredicateOperator.java
Outdated
Show resolved
Hide resolved
A question: should the function signature register with |
List<SerializableFunction<FunctionName, org.apache.commons.lang3.tuple.Pair<FunctionSignature, | ||
FunctionBuilder>>> functionsTwo = typeList.stream().map(v -> | ||
impl((UnaryPredicateOperator::exprIf), v, UNKNOWN, v, v)) | ||
.collect(Collectors.toList()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as my previous question for line 130-133, why is this required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we consider the solution which could for case...when and if. i think they both control flow statement which may not fit into our function defintion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea.
Todo issue: merge if function with case when function. |
Issue #861 , if available:
Description of changes:
Add flow control function IF(expr1, expr2, expr3)
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.