Skip to content

Skip polars tests relying on newer sqlite features - #22870

Merged
rapids-bot[bot] merged 1 commit into
NVIDIA:mainfrom
TomAugspurger:tom/cudf-polars-polars-tests-skips
Jun 12, 2026
Merged

Skip polars tests relying on newer sqlite features#22870
rapids-bot[bot] merged 1 commit into
NVIDIA:mainfrom
TomAugspurger:tom/cudf-polars-polars-tests-skips

Conversation

@TomAugspurger

@TomAugspurger TomAugspurger commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description

Some polars tests are failing on nightly CI, which runs with both latest and our earliest-supported dependencies. Some of the polars tests uses sqlite features not available with the Python / sqlite used in our earliest-supported matrix.

This checks the sqlite version and skips the problematic tests when it's too old.

Note that CI doesn't run polars tests with earliest-supported, so a passing test here doesn't necessarily mean we fixed everything.

Closes #22850

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Some polars tests are failing on nightly CI, which runs with both latest and
our earliest-supported dependencies. Some of the polars tests uses
sqlite features not available with the Python / sqlite used in our
earliest-supported matrix.

This checks the sqlite version and skips the problematic tests.

Closes NVIDIA#22850
@TomAugspurger
TomAugspurger requested a review from a team as a code owner June 12, 2026 14:52
@github-actions github-actions Bot added Python Affects Python cuDF API. cudf-polars Issues specific to cudf-polars labels Jun 12, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python Jun 12, 2026
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 02e65cf3-2a49-4959-a372-ca01c7aa50ec

📥 Commits

Reviewing files that changed from the base of the PR and between f566057 and 0514c0e.

📒 Files selected for processing (1)
  • python/cudf_polars/cudf_polars/testing/inject_gpu_engine.py

📝 Walkthrough

Summary by CodeRabbit

  • Tests
    • Enhanced GPU-engine testing plugin with runtime SQLite version detection. Automatically skips incompatible SQL filter-clause and string-aggregation tests on systems with SQLite 3.44.0 or earlier to prevent syntax errors during test execution.

Walkthrough

The pytest GPU-engine injection plugin now conditionally skips specific string-aggregation and filter-clause tests when running with SQLite versions <= 3.44.0. This addresses OperationalError syntax errors in earlier SQLite versions. The implementation adds version detection imports, updates the skip-list type annotation, and applies a runtime version gate to update the skip list.

Changes

SQLite Version-Based Test Skip Logic

Layer / File(s) Summary
SQLite version-conditional test skip mechanism
python/cudf_polars/cudf_polars/testing/inject_gpu_engine.py
Imports sqlite3 and packaging.version for version detection; updates TESTS_TO_SKIP type from Mapping[str, str] to dict[str, str]; conditionally appends multiple SQL filter-clause and string-aggregation test identifiers to the skip list when SQLite is version <= 3.44.0.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • rapidsai/cudf#22605: Both PRs modify TESTS_TO_SKIP skip-list entries in the GPU-engine injection plugin; this PR adds SQLite-version-based skips while the retrieved PR removes or edits specific skips.

Suggested labels

Python, cudf-polars, non-breaking, improvement

Suggested reviewers

  • nirandaperera
  • vyasr
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding logic to skip polars tests that rely on newer SQLite features when running against older SQLite versions.
Description check ✅ Passed The description is clearly related to the changeset, explaining why the tests need to be skipped and how the fix addresses the issue reported in #22850.
Linked Issues check ✅ Passed The PR successfully addresses the objective from issue #22850 by implementing SQLite version checking to skip tests relying on newer SQLite features (STRING_AGG, GROUP_CONCAT with ORDER BY syntax).
Out of Scope Changes check ✅ Passed All changes are directly related to addressing the linked issue: adding SQLite version checks and conditionally skipping problematic tests with no unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

}


if packaging.version.parse(sqlite3.sqlite_version) <= packaging.version.parse("3.44.0"):

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.

Presumably this would fail with polars CPU and should be fixed there?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Correct. I opted not to open an issue since sqlite3 is a bit of an odd dependency (typically, though not always bundled with Python).

@TomAugspurger TomAugspurger added bug Something isn't working non-breaking Non-breaking change labels Jun 12, 2026
@TomAugspurger

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit 7398687 into NVIDIA:main Jun 12, 2026
114 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python Jun 12, 2026
@TomAugspurger
TomAugspurger deleted the tom/cudf-polars-polars-tests-skips branch June 12, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cudf-polars Issues specific to cudf-polars non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: test_string_agg_aliases test failure in cudf-polars-polars-tests

3 participants