Skip to content

Fix unstable test_json_accessor.py#520

Draft
wudidapaopao wants to merge 1 commit intochdb-io:mainfrom
wudidapaopao:fix_ci_tests
Draft

Fix unstable test_json_accessor.py#520
wudidapaopao wants to merge 1 commit intochdb-io:mainfrom
wudidapaopao:fix_ci_tests

Conversation

@wudidapaopao
Copy link
Contributor

Fixed #519

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Information about CI checks: https://clickhouse.com/docs/en/development/continuous-integration/

CI Settings

NOTE: If your merge the PR with modified CI you MUST KNOW what you are doing
NOTE: Checked options will be applied if set before CI RunConfig/PrepareRunConfig step

Run these jobs only (required builds will be added automatically):

  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Unit tests
  • Performance tests
  • All with aarch64
  • All with ASAN
  • All with TSAN
  • All with Analyzer
  • All with Azure
  • Add your option here

Deny these jobs:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Performance tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All with Aarch64

Extra options:

  • do not test (only style check)
  • disable merge-commit (no merge from master before tests)
  • disable CI cache (job reuse)

Only specified batches in multi-batch jobs:

  • 1
  • 2
  • 3
  • 4

@auxten
Copy link
Member

auxten commented Feb 13, 2026

Best effort same behavior with Pandas including data types and order is our design.

This PR masks the symptom rather than fixing the root cause, which doesn't align with our testing principles:

  1. Band-aid fix: Adding .to_df().sort_values('id') after execution hides a DataStore bug — the fixtures already have ORDER BY id, so if row order is non-deterministic, the issue is in DataStore's execution pipeline, not the tests.
  2. Inconsistent with existing tests in the same file: Lines 72/83/94 already use the correct pattern ds.sort_values('id').to_df() (lazy, DataStore-level sort). This PR adds 7 instances of ds.to_df().sort_values('id') (pandas-level sort), which bypasses the lazy pipeline.

If a quick fix is needed, at minimum unify to ds.sort_values('id').to_df(). But the real fix should investigate why DataStore.from_df(df) loses row order from the source DataFrame.

@wudidapaopao wudidapaopao marked this pull request as draft February 13, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky Test: tests/test_json_accessor.py

2 participants