-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add PPL Between functionality #758
base: main
Are you sure you want to change the base?
Conversation
hi @dr-lilienthal |
@dr-lilienthal
|
75e8dd4
to
6c13c69
Compare
1d82270
to
1622e1e
Compare
...cala/org/opensearch/flint/spark/ppl/PPLLogicalPlanBetweenExpressionTranslatorTestSuite.scala
Outdated
Show resolved
Hide resolved
Signed-off-by: Hendrik Saly <hendrik.saly@eliatra.com>
Signed-off-by: Jens Schmidt <jens.schmidt@eliatra.com>
Signed-off-by: Hendrik Saly <hendrik.saly@eliatra.com>
Signed-off-by: Jens Schmidt <jens.schmidt@eliatra.com>
Signed-off-by: Jens Schmidt <jens.schmidt@eliatra.com>
Signed-off-by: Jens Schmidt <jens.schmidt@eliatra.com>
Signed-off-by: Jens Schmidt <jens.schmidt@eliatra.com>
@@ -371,6 +371,7 @@ logicalExpression | |||
| left = logicalExpression OR right = logicalExpression # logicalOr | |||
| left = logicalExpression XOR right = logicalExpression # logicalXor | |||
| booleanExpression # booleanExpr | |||
| expr1 = functionArg NOT? BETWEEN expr2 = functionArg AND expr3 = functionArg # between |
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.
Move this new expression under booleanExpression
@@ -368,6 +368,7 @@ LIKE: 'LIKE'; | |||
ISNULL: 'ISNULL'; | |||
ISNOTNULL: 'ISNOTNULL'; | |||
ISPRESENT: 'ISPRESENT'; | |||
BETWEEN: 'BETWEEN'; |
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.
Add BETWEEN
to keywordsCanBeId
@@ -49,6 +49,8 @@ _- **Limitation: new field added by eval command with a function cannot be dropp | |||
- `source = table | where isempty(a)` | |||
- `source = table | where isblank(a)` | |||
- `source = table | where case(length(a) > 6, 'True' else 'False') = 'True'` | |||
- `source = table | where a between 1 and 4` |
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.
I think we need explain the range of between
is [1, 4] rather than (1, 4) in user doc. From the code implementation, I think it is [1, 4]. In anther word, when a = 1, the predicate returns True
}) | ||
} | ||
|
||
test("test between should return records NOT between two values") { |
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 add two tests (between and not between) with Date/Time in condition?
I think you can use the table by createTimeSeriesTable
Description
Add PPL Between functionality
Issues Resolved
#679
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.