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

[FEATURE] Add "between" expression to PPL #679

Open
A-Gray-Cat opened this issue Sep 18, 2024 · 4 comments
Open

[FEATURE] Add "between" expression to PPL #679

A-Gray-Cat opened this issue Sep 18, 2024 · 4 comments
Labels
0.6 enhancement New feature or request Lang:PPL Pipe Processing Language support

Comments

@A-Gray-Cat
Copy link

Is your feature request related to a problem?
When doing comparisons for a range, it will be very convenient to have a between command, e.g.

Instead of writing, ... | where datetime >= '2024-09-10' and datetime <= '2024-09-15', it can be written as ... | where datetime between '2024-09-10' and '2024-09-15'.

What solution would you like?
Add the "between" expression. This is a nice to have.

What alternatives have you considered?
A clear and concise description of any alternative solutions or features you've considered.

Do you have any additional context?
Add any other context or screenshots about the feature request here.

@A-Gray-Cat A-Gray-Cat added enhancement New feature or request untriaged labels Sep 18, 2024
@YANG-DB YANG-DB added the Lang:PPL Pipe Processing Language support label Sep 19, 2024
@YANG-DB
Copy link
Member

YANG-DB commented Sep 30, 2024

@salyh Can u plz review and validate this issue ?
thanks

@salyh
Copy link
Contributor

salyh commented Oct 6, 2024

It's a valid request albeit its only syntactic sugar. Spark SQL does have a BETWEEN function so it makes sense.

@A-Gray-Cat @YANG-DB I suggest to implement it like expr1 [NOT] BETWEEN expr2 AND expr3 - evaluate if expr1 is [not] in between expr2 and expr3. exactly like Spark SQL is implementing it (https://spark.apache.org/docs/latest/api/sql/#between)

@dblock dblock removed the untriaged label Oct 7, 2024
@dblock
Copy link
Member

dblock commented Oct 7, 2024

[Catch All Triage - 1, 2, 3, 4]

@YANG-DB
Copy link
Member

YANG-DB commented Oct 8, 2024

It's a valid request albeit its only syntactic sugar. Spark SQL does have a BETWEEN function so it makes sense.

@A-Gray-Cat @YANG-DB I suggest to implement it like expr1 [NOT] BETWEEN expr2 AND expr3 - evaluate if expr1 is [not] in between expr2 and expr3. exactly like Spark SQL is implementing it (https://spark.apache.org/docs/latest/api/sql/#between)

@salyh agree lets proceed with the suggested syntax
please add this suggestion to the ppl planning list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.6 enhancement New feature or request Lang:PPL Pipe Processing Language support
Projects
Status: InReview
Development

No branches or pull requests

4 participants