Skip to content

Conversation

@LantaoJin
Copy link
Member

@LantaoJin LantaoJin commented Jul 9, 2025

Description

Similar to #3822

Add ClickBench (https://github.com/ClickHouse/ClickBench) to PPL IT suite.
Only one documentation in clickbench index.

It prints the end2end execution times, on my laptop is:

Summary of PPLClickBenchIT:
q1: 14 ms
q10: 5 ms
q11: 7 ms
q12: 7 ms
q13: 6 ms
q14: 6 ms
q15: 6 ms
q16: 4 ms
q17: 5 ms
q18: 5 ms
q19: 7 ms
q2: 9 ms
q20: 4 ms
q21: 7 ms
q22: 8 ms
q23: 8 ms
q24: 6 ms
q25: 5 ms
q26: 5 ms
q27: 6 ms
q28: 7 ms
q3: 7 ms
q30: 35 ms
q31: 7 ms
q32: 6 ms
q33: 6 ms
q34: 4 ms
q35: 6 ms
q36: 7 ms
q37: 9 ms
q38: 9 ms
q39: 9 ms
q4: 6 ms
q40: 8 ms
q41: 8 ms
q42: 8 ms
q43: 7 ms
q5: 6 ms
q6: 5 ms
q7: 6 ms
q8: 7 ms
q9: 6 ms
Total 42 queries succeed. Average duration: 7 ms
Summary of CalcitePPLClickBenchIT:
q1: 23 ms
q10: 37 ms
q11: 18 ms
q12: 28 ms
q13: 15 ms
q14: 16 ms
q15: 28 ms
q16: 15 ms
q17: 14 ms
q18: 13 ms
q19: 22 ms
q2: 23 ms
q20: 8 ms
q21: 17 ms
q22: 23 ms
q23: 32 ms
q24: 24 ms
q25: 13 ms
q26: 11 ms
q27: 12 ms
q28: 26 ms
q3: 19 ms
q30: 100 ms
q31: 22 ms
q32: 23 ms
q33: 17 ms
q34: 12 ms
q35: 17 ms
q36: 17 ms
q37: 23 ms
q38: 24 ms
q39: 22 ms
q4: 15 ms
q40: 26 ms
q41: 23 ms
q42: 21 ms
q43: 38 ms
q5: 12 ms
q6: 11 ms
q7: 10 ms
q8: 19 ms
q9: 18 ms
Total 42 queries succeed. Average duration: 21 ms

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

Signed-off-by: Lantao Jin <ltjin@amazon.com>
@LantaoJin LantaoJin added testing Related to improving software testing enhancement New feature or request labels Jul 9, 2025
@penghuo
Copy link
Collaborator

penghuo commented Jul 9, 2025

@noCharger please review it


@Override
protected Set<Integer> ignored() {
return Set.of(29, 41, 43);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q29: REGEXP_REPLACE() is not supported.
q41: Failed in Calcite engine, TBD
q43: DATE_TRUNC() is not supported.

Copy link
Member Author

@LantaoJin LantaoJin Jul 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: only q29 is ignored.
q29: REGEXP_REPLACE() is not supported.
q41: a bug of Sarg, fixed in latest commit
q43: DATE_TRUNC() is not supported. Using DATE_FORMAT() instead. ref link

@@ -0,0 +1,5 @@
source=hits
| where like(URL, '%google%') and SearchPhrase != ''
| stats /* min(URL), */ count() as c by SearchPhrase
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can not push down min aggregation on TEXT field in OpenSearch, commented it out.

@@ -0,0 +1,7 @@
// EventDate >= '2013-07-01' should work in v3
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be resolved by #3831

Signed-off-by: Lantao Jin <ltjin@amazon.com>
Signed-off-by: Lantao Jin <ltjin@amazon.com>
Signed-off-by: Lantao Jin <ltjin@amazon.com>
Copy link
Collaborator

@noCharger noCharger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change.

@qianheng-aws qianheng-aws merged commit 9af1567 into opensearch-project:main Jul 11, 2025
23 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.19-dev failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/sql/backport-2.19-dev 2.19-dev
# Navigate to the new working tree
pushd ../.worktrees/sql/backport-2.19-dev
# Create a new branch
git switch --create backport/backport-3860-to-2.19-dev
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9af1567bbb4b04cafbfd40f460f3c0384b31dc81
# Push it to GitHub
git push --set-upstream origin backport/backport-3860-to-2.19-dev
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/sql/backport-2.19-dev

Then, create a pull request where the base branch is 2.19-dev and the compare/head branch is backport/backport-3860-to-2.19-dev.

LantaoJin added a commit to LantaoJin/search-plugins-sql that referenced this pull request Jul 11, 2025
* Add clickbench IT Suite

Signed-off-by: Lantao Jin <ltjin@amazon.com>

* Add original SQL and fix the bug of Sarg point (q41)

Signed-off-by: Lantao Jin <ltjin@amazon.com>

* fix IT of Sarg related

Signed-off-by: Lantao Jin <ltjin@amazon.com>

* Fix UT

Signed-off-by: Lantao Jin <ltjin@amazon.com>

---------

Signed-off-by: Lantao Jin <ltjin@amazon.com>
(cherry picked from commit 9af1567)
penghuo pushed a commit that referenced this pull request Jul 14, 2025
* Add clickbench IT Suite



* Add original SQL and fix the bug of Sarg point (q41)



* fix IT of Sarg related



* Fix UT



---------


(cherry picked from commit 9af1567)

Signed-off-by: Lantao Jin <ltjin@amazon.com>
@LantaoJin LantaoJin added the backport-manually Filed a PR to backport manually. label Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.19-dev backport-failed backport-manually Filed a PR to backport manually. enhancement New feature or request testing Related to improving software testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants