Caideyipi opened a new pull request, #18595:
URL: https://github.com/apache/iotdb/pull/18595

   ## 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.
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
   - [x] added Javadocs for the non-trivial validation method.
   - [x] added comments explaining the intent where it is not obvious.
   - [x] added unit tests covering the new paths.
   
   <hr>
   
   ##### Key changed/added classes
   
   - `PipeConvertedInsertTabletStatement`
   - `LoadConvertedInsertTabletStatement`
   - `PipeConvertedInsertTabletStatementTest`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to