Skip to content

[Pipe] Fix tablet type conversion for failed columns - #18595

Merged
jt2594838 merged 1 commit into
apache:masterfrom
Caideyipi:codex/fix-incomplete-tablet-type-conversion
Sep 8, 2026
Merged

[Pipe] Fix tablet type conversion for failed columns#18595
jt2594838 merged 1 commit into
apache:masterfrom
Caideyipi:codex/fix-incomplete-tablet-type-conversion

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

Problem

A partial insert can leave a failed tablet measurement without a data type or value column. Pipe and Load type-conversion retries restore that failed measurement before schema validation, but their conversion overrides indexed the tablet arrays unconditionally. This could throw NullPointerException or ArrayIndexOutOfBoundsException instead of preserving the partial-insert result.

This is a follow-up to #17879, which made missing and null tablet columns valid partial-insert state across the write path.

Changes

  • Validate the target type, measurement, source type, value column, and array bounds before Pipe tablet conversion.
  • Reuse the same validation in the Load conversion override before logging or converting.
  • Add regression coverage for missing columns, null failed measurements, and the Load conversion path.

Tests

  • mvn spotless:apply -pl iotdb-core/datanode
  • Targeted JUnit execution against the changed classes: OK (3 tests)
  • The same tests against the pre-fix classes fail with the reproduced NPE/out-of-bounds behavior.

The regular single-module Maven test lifecycle was also attempted, but the local incremental build failed before test execution on unrelated generated fill/aggregation sources with missing symbols.


This PR has:

  • been self-reviewed.
  • added Javadocs for the non-trivial validation method.
  • added comments explaining the intent where it is not obvious.
  • added unit tests covering the new paths.

Key changed/added classes
  • PipeConvertedInsertTabletStatement
  • LoadConvertedInsertTabletStatement
  • PipeConvertedInsertTabletStatementTest

@jt2594838
jt2594838 merged commit 31e7534 into apache:master Sep 8, 2026
39 checks passed
@jt2594838
jt2594838 deleted the codex/fix-incomplete-tablet-type-conversion branch September 8, 2026 06:56
jt2594838 pushed a commit that referenced this pull request Sep 9, 2026
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.

2 participants