-
Notifications
You must be signed in to change notification settings - Fork 34
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
Implementation of case function. #695
Conversation
@@ -504,7 +506,63 @@ class FlintSparkPPLEvalITSuite | |||
comparePlans(logicalPlan, expectedPlan, checkAnalysis = false) | |||
} | |||
|
|||
test("eval case function") { |
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.
Can you also add more complex tests use case including composition of additional commands such as where conditions and stats ?
thanks
@@ -348,4 +348,38 @@ class FlintSparkPPLFiltersITSuite | |||
assert(compareByString(expectedPlan) === compareByString(logicalPlan)) | |||
} | |||
|
|||
test("case function used as filter") { |
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.
can u also add here some additional tests use cases of more complicated composition ppl commands ?
@@ -265,6 +266,15 @@ Assumptions: `a`, `b`, `c` are existing fields in `table` | |||
- `source = table | eval f = ispresent(a)` | |||
- `source = table | eval r = coalesce(a, b, c) | fields r` | |||
- `source = table | eval e = isempty(a) | fields e` | |||
``` |
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.
plz add more examples for using case in other use cases that include where clause / stats commands
@@ -171,6 +171,8 @@ public T visitIsEmpty(IsEmpty node, C context) { | |||
return visitChildren(node, context); | |||
} | |||
|
|||
// TODO add case |
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.
why is it TODO ?
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 catch. I need to remove this TODO.
Signed-off-by: Lukasz Soszynski <[email protected]>
4496532
to
cb6601c
Compare
@lukasz-soszynski-eliatra please ping me when this is ready for review |
I'll do my best to make corrections today. |
Signed-off-by: Lukasz Soszynski <[email protected]>
@YANG-DB does this syntax match what we expected? From the issue description, the valid synatx is:
An valid example:
But the implementation we merged is totally different as:
The example above needs rewritten to
Note, the |
Description
Implementation of the
case
functionIssues Resolved
#645
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.