Skip to content
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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

dr-lilienthal
Copy link

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.

@YANG-DB
Copy link
Member

YANG-DB commented Oct 9, 2024

hi @dr-lilienthal
plz fix DCO ...

@YANG-DB YANG-DB added Lang:PPL Pipe Processing Language support 0.5 0.6 and removed 0.5 labels Oct 9, 2024
@YANG-DB
Copy link
Member

YANG-DB commented Oct 11, 2024

@dr-lilienthal
please add documentation in the following locations:

  • ../docs/ppl-lang/PPL-Example-Commands.md
  • ../docs/ppl-lang/README.md
    Thanks

@dr-lilienthal
Copy link
Author

@YANG-DB ready for review CC: @salyh

salyh and others added 3 commits October 25, 2024 10:49
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>
salyh and others added 5 commits October 25, 2024 10:49
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
Copy link
Member

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';
Copy link
Member

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`
Copy link
Member

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") {
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.6 Lang:PPL Pipe Processing Language support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants