Skip to content

Migrate standalone integration tests to remote tests - #3778

Merged
LantaoJin merged 28 commits into
opensearch-project:mainfrom
yuancu:migrate-it
Jun 17, 2025
Merged

LantaoJin merged 28 commits into
opensearch-project:mainfrom
yuancu:migrate-it

Conversation

@yuancu

@yuancu yuancu commented Jun 16, 2025 •

Copy link
Copy Markdown
Collaborator

Description

Migrate standalone integration tests to remote tests to better align with production environments.

Additionally, I created a test suite called CalciteNoPushdownIT. It will run all remote tests without pushdown enabled. This replaces original IT classes with names like Calcite***PushdownIT.

Implementation notes:

  • CalcitePPLDateTimeBuiltinFunctionIT is not migrated since the timezone and locale of the cluster started locally differ from the settings of the test environment. E.g. I can't make -Dtests.locale=my-Mymr-MM -Dtests.timezone=PST take effect on the local opensearch cluster. (To fix in the future)
  • CalciteExplainIT is not added to no-pushdown tests yet. It requires corresponding plans with Calcite without pushdown.
  • CalciteIPComparisonIT is not added to no-pushdown tests yet. It requires fixing IP comparison with Calcite [FEATURE] Support comparing IP values with Calcite #3776

Related Issues

Resolves #3777

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.

yuancu and others added 19 commits June 11, 2025 15:23
Additionally:
- Migrate CalcitePPLBasicIT to remote ITs
- Delete CalcitePPLBasicPushdownIT since the remote ITs enable pushdown by default

Signed-off-by: Yuanchun Shen <[email protected]>
migrate calcite IT and delete related pushdown IT
Signed-off-by: Xinyu Hao <[email protected]>
Signed-off-by: Yuanchun Shen <[email protected]>
Signed-off-by: Yuanchun Shen <[email protected]>
@yuancu
yuancu marked this pull request as draft June 17, 2025 03:01
@yuancu
yuancu marked this pull request as ready for review June 17, 2025 03:40
@LantaoJin LantaoJin added calcite calcite migration releated testing Related to improving software testing labels Jun 17, 2025
schema("avg_price", "double"),
schema("avg_disc", "double"),
schema("count_order", "long"));
schema("count_order", "bigint"));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can TpchIT be migrated to remote IT?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes. Migrated.

@LantaoJin
LantaoJin merged commit 918c153 into opensearch-project:main Jun 17, 2025
@opensearch-trigger-bot

Copy link
Copy Markdown
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-3778-to-2.19-dev
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 918c153ca99565e304364a5765f950aab86df64a
# Push it to GitHub
git push --set-upstream origin backport/backport-3778-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-3778-to-2.19-dev.

@LantaoJin

Copy link
Copy Markdown
Member

@yuancu could you help to backport it to 2.19-dev

@yuancu

yuancu commented Jun 18, 2025

Copy link
Copy Markdown
Collaborator Author

@yuancu could you help to backport it to 2.19-dev

Sure

yuancu added a commit to yuancu/sql-plugin that referenced this pull request Jun 18, 2025
…ect#3778)

* Use PPL_SPEC in standalone ITs

Additionally:
- Migrate CalcitePPLBasicIT to remote ITs
- Delete CalcitePPLBasicPushdownIT since the remote ITs enable pushdown by default

Signed-off-by: Yuanchun Shen <[email protected]>

* Migrate array, aggregation, appendcol, and datetime ITs to remote

Signed-off-by: Yuanchun Shen <[email protected]>

* Migrate case, datetime, condition, cryptographic function ITs

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix return types in CalcitePPLTpchIT

Signed-off-by: Yuanchun Shen <[email protected]>

* migrate calcite IT and delete related pushdown IT

Signed-off-by: Xinyu Hao <[email protected]>

* Temporarily move datetime ITs back to standalone mode

Signed-off-by: Yuanchun Shen <[email protected]>

* WIP: trying to enbale no-pushdown tests

Signed-off-by: Yuanchun Shen <[email protected]>

* add pushdown IT button

Signed-off-by: Xinyu Hao <[email protected]>

* Fix remote ITs

Signed-off-by: Yuanchun Shen <[email protected]>

* Enable no pushdown tests

Signed-off-by: Yuanchun Shen <[email protected]>

* Change pushdown settings only when necessary (fixing CalciteSettingsIT)

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix sum null tests with and without pushdown

Signed-off-by: Yuanchun Shen <[email protected]>

* Update pushdown with transient flag

Signed-off-by: Yuanchun Shen <[email protected]>

* Ignore IP comparison and explain ITs in CalciteNoPushdownIT

Signed-off-by: Yuanchun Shen <[email protected]>

* Delete CalcitePushdownIT since all tests are run with pushdown enabled by default

Signed-off-by: Yuanchun Shen <[email protected]>

* Restore pushdown config after CalciteNoPushdownIT class

Signed-off-by: Yuanchun Shen <[email protected]>

* Move expected explain strings to files to circurmvent issues related to comparison involves windows new lines

Signed-off-by: Yuanchun Shen <[email protected]>

* Throw narrower exceptions where it uses loadFromFile

Signed-off-by: Yuanchun Shen <[email protected]>

* Replace window line enddings with unix line enddings for remote tests' responses

Signed-off-by: Yuanchun Shen <[email protected]>

* Revert "Replace window line enddings with unix line enddings for remote tests' responses"

This reverts commit 812fd0d.

Signed-off-by: Yuanchun Shen <[email protected]>

* Use explainQueryToString for explain ITs

Signed-off-by: Yuanchun Shen <[email protected]>

* Use executeWithReplace for explain command variants

Signed-off-by: Yuanchun Shen <[email protected]>

* Migrate CalcitePPLTpchIT to remote test

Signed-off-by: Yuanchun Shen <[email protected]>

* Replace windows carriages with spaces when sanitizing queries to explain

Signed-off-by: Yuanchun Shen <[email protected]>

---------

Signed-off-by: Yuanchun Shen <[email protected]>
Signed-off-by: Xinyu Hao <[email protected]>
Co-authored-by: Xinyu Hao <[email protected]>
(cherry picked from commit 918c153)
yuancu added a commit to yuancu/sql-plugin that referenced this pull request Jun 18, 2025
…ect#3778)

* Use PPL_SPEC in standalone ITs

Additionally:
- Migrate CalcitePPLBasicIT to remote ITs
- Delete CalcitePPLBasicPushdownIT since the remote ITs enable pushdown by default

Signed-off-by: Yuanchun Shen <[email protected]>

* Migrate array, aggregation, appendcol, and datetime ITs to remote

Signed-off-by: Yuanchun Shen <[email protected]>

* Migrate case, datetime, condition, cryptographic function ITs

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix return types in CalcitePPLTpchIT

Signed-off-by: Yuanchun Shen <[email protected]>

* migrate calcite IT and delete related pushdown IT

Signed-off-by: Xinyu Hao <[email protected]>

* Temporarily move datetime ITs back to standalone mode

Signed-off-by: Yuanchun Shen <[email protected]>

* WIP: trying to enbale no-pushdown tests

Signed-off-by: Yuanchun Shen <[email protected]>

* add pushdown IT button

Signed-off-by: Xinyu Hao <[email protected]>

* Fix remote ITs

Signed-off-by: Yuanchun Shen <[email protected]>

* Enable no pushdown tests

Signed-off-by: Yuanchun Shen <[email protected]>

* Change pushdown settings only when necessary (fixing CalciteSettingsIT)

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix sum null tests with and without pushdown

Signed-off-by: Yuanchun Shen <[email protected]>

* Update pushdown with transient flag

Signed-off-by: Yuanchun Shen <[email protected]>

* Ignore IP comparison and explain ITs in CalciteNoPushdownIT

Signed-off-by: Yuanchun Shen <[email protected]>

* Delete CalcitePushdownIT since all tests are run with pushdown enabled by default

Signed-off-by: Yuanchun Shen <[email protected]>

* Restore pushdown config after CalciteNoPushdownIT class

Signed-off-by: Yuanchun Shen <[email protected]>

* Move expected explain strings to files to circurmvent issues related to comparison involves windows new lines

Signed-off-by: Yuanchun Shen <[email protected]>

* Throw narrower exceptions where it uses loadFromFile

Signed-off-by: Yuanchun Shen <[email protected]>

* Replace window line enddings with unix line enddings for remote tests' responses

Signed-off-by: Yuanchun Shen <[email protected]>

* Revert "Replace window line enddings with unix line enddings for remote tests' responses"

This reverts commit 812fd0d.

Signed-off-by: Yuanchun Shen <[email protected]>

* Use explainQueryToString for explain ITs

Signed-off-by: Yuanchun Shen <[email protected]>

* Use executeWithReplace for explain command variants

Signed-off-by: Yuanchun Shen <[email protected]>

* Migrate CalcitePPLTpchIT to remote test

Signed-off-by: Yuanchun Shen <[email protected]>

* Replace windows carriages with spaces when sanitizing queries to explain

Signed-off-by: Yuanchun Shen <[email protected]>

---------

Signed-off-by: Yuanchun Shen <[email protected]>
Signed-off-by: Xinyu Hao <[email protected]>
Co-authored-by: Xinyu Hao <[email protected]>
(cherry picked from commit 918c153)
yuancu added a commit to yuancu/sql-plugin that referenced this pull request Jun 18, 2025
…ect#3778)

* Use PPL_SPEC in standalone ITs

Additionally:
- Migrate CalcitePPLBasicIT to remote ITs
- Delete CalcitePPLBasicPushdownIT since the remote ITs enable pushdown by default

Signed-off-by: Yuanchun Shen <[email protected]>

* Migrate array, aggregation, appendcol, and datetime ITs to remote

Signed-off-by: Yuanchun Shen <[email protected]>

* Migrate case, datetime, condition, cryptographic function ITs

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix return types in CalcitePPLTpchIT

Signed-off-by: Yuanchun Shen <[email protected]>

* migrate calcite IT and delete related pushdown IT

Signed-off-by: Xinyu Hao <[email protected]>

* Temporarily move datetime ITs back to standalone mode

Signed-off-by: Yuanchun Shen <[email protected]>

* WIP: trying to enbale no-pushdown tests

Signed-off-by: Yuanchun Shen <[email protected]>

* add pushdown IT button

Signed-off-by: Xinyu Hao <[email protected]>

* Fix remote ITs

Signed-off-by: Yuanchun Shen <[email protected]>

* Enable no pushdown tests

Signed-off-by: Yuanchun Shen <[email protected]>

* Change pushdown settings only when necessary (fixing CalciteSettingsIT)

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix sum null tests with and without pushdown

Signed-off-by: Yuanchun Shen <[email protected]>

* Update pushdown with transient flag

Signed-off-by: Yuanchun Shen <[email protected]>

* Ignore IP comparison and explain ITs in CalciteNoPushdownIT

Signed-off-by: Yuanchun Shen <[email protected]>

* Delete CalcitePushdownIT since all tests are run with pushdown enabled by default

Signed-off-by: Yuanchun Shen <[email protected]>

* Restore pushdown config after CalciteNoPushdownIT class

Signed-off-by: Yuanchun Shen <[email protected]>

* Move expected explain strings to files to circurmvent issues related to comparison involves windows new lines

Signed-off-by: Yuanchun Shen <[email protected]>

* Throw narrower exceptions where it uses loadFromFile

Signed-off-by: Yuanchun Shen <[email protected]>

* Replace window line enddings with unix line enddings for remote tests' responses

Signed-off-by: Yuanchun Shen <[email protected]>

* Revert "Replace window line enddings with unix line enddings for remote tests' responses"

This reverts commit 812fd0d.

Signed-off-by: Yuanchun Shen <[email protected]>

* Use explainQueryToString for explain ITs

Signed-off-by: Yuanchun Shen <[email protected]>

* Use executeWithReplace for explain command variants

Signed-off-by: Yuanchun Shen <[email protected]>

* Migrate CalcitePPLTpchIT to remote test

Signed-off-by: Yuanchun Shen <[email protected]>

* Replace windows carriages with spaces when sanitizing queries to explain

Signed-off-by: Yuanchun Shen <[email protected]>

---------

Signed-off-by: Yuanchun Shen <[email protected]>
Signed-off-by: Xinyu Hao <[email protected]>
Co-authored-by: Xinyu Hao <[email protected]>
(cherry picked from commit 918c153)
penghuo pushed a commit that referenced this pull request Jun 18, 2025
…sts (#3790)

* Migrate standalone integration tests to remote tests (#3778)

* Use PPL_SPEC in standalone ITs

Additionally:
- Migrate CalcitePPLBasicIT to remote ITs
- Delete CalcitePPLBasicPushdownIT since the remote ITs enable pushdown by default

Signed-off-by: Yuanchun Shen <[email protected]>

* Migrate array, aggregation, appendcol, and datetime ITs to remote

Signed-off-by: Yuanchun Shen <[email protected]>

* Migrate case, datetime, condition, cryptographic function ITs

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix return types in CalcitePPLTpchIT

Signed-off-by: Yuanchun Shen <[email protected]>

* migrate calcite IT and delete related pushdown IT

Signed-off-by: Xinyu Hao <[email protected]>

* Temporarily move datetime ITs back to standalone mode

Signed-off-by: Yuanchun Shen <[email protected]>

* WIP: trying to enbale no-pushdown tests

Signed-off-by: Yuanchun Shen <[email protected]>

* add pushdown IT button

Signed-off-by: Xinyu Hao <[email protected]>

* Fix remote ITs

Signed-off-by: Yuanchun Shen <[email protected]>

* Enable no pushdown tests

Signed-off-by: Yuanchun Shen <[email protected]>

* Change pushdown settings only when necessary (fixing CalciteSettingsIT)

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix sum null tests with and without pushdown

Signed-off-by: Yuanchun Shen <[email protected]>

* Update pushdown with transient flag

Signed-off-by: Yuanchun Shen <[email protected]>

* Ignore IP comparison and explain ITs in CalciteNoPushdownIT

Signed-off-by: Yuanchun Shen <[email protected]>

* Delete CalcitePushdownIT since all tests are run with pushdown enabled by default

Signed-off-by: Yuanchun Shen <[email protected]>

* Restore pushdown config after CalciteNoPushdownIT class

Signed-off-by: Yuanchun Shen <[email protected]>

* Move expected explain strings to files to circurmvent issues related to comparison involves windows new lines

Signed-off-by: Yuanchun Shen <[email protected]>

* Throw narrower exceptions where it uses loadFromFile

Signed-off-by: Yuanchun Shen <[email protected]>

* Replace window line enddings with unix line enddings for remote tests' responses

Signed-off-by: Yuanchun Shen <[email protected]>

* Revert "Replace window line enddings with unix line enddings for remote tests' responses"

This reverts commit 812fd0d.

Signed-off-by: Yuanchun Shen <[email protected]>

* Use explainQueryToString for explain ITs

Signed-off-by: Yuanchun Shen <[email protected]>

* Use executeWithReplace for explain command variants

Signed-off-by: Yuanchun Shen <[email protected]>

* Migrate CalcitePPLTpchIT to remote test

Signed-off-by: Yuanchun Shen <[email protected]>

* Replace windows carriages with spaces when sanitizing queries to explain

Signed-off-by: Yuanchun Shen <[email protected]>

---------

Signed-off-by: Yuanchun Shen <[email protected]>
Signed-off-by: Xinyu Hao <[email protected]>
Co-authored-by: Xinyu Hao <[email protected]>
(cherry picked from commit 918c153)

* Fix fields comparison in CalcitePPLRenameIT

Signed-off-by: Yuanchun Shen <[email protected]>

---------

Signed-off-by: Yuanchun Shen <[email protected]>
Signed-off-by: Xinyu Hao <[email protected]>
Co-authored-by: Xinyu Hao <[email protected]>
@Swiddis Swiddis added the maintenance Improves code quality, but not the product label Jun 26, 2025
@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. calcite calcite migration releated maintenance Improves code quality, but not the product testing Related to improving software testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Migrate integration tests from standalone to remote

5 participants