hongzhi-gao opened a new pull request, #18908:
URL: https://github.com/apache/iotdb/pull/18908

   ## Description
   
   Reject table rows when schema validation or type conversion rejects every 
FIELD, instead of persisting their timestamps and TAGs. With partial insertion 
enabled, this example now returns `507: No column other than Time present, 
please check the request` and leaves no row:
   
   ```sql
   CREATE TABLE t (tag1 STRING TAG, s1 INT64 FIELD);
   INSERT INTO t(time, s1) VALUES(1, true);
   ```
   
   Filter rejected-only rows before device validation and partition lookup. If 
valid rows or FIELDs remain, continue partial insertion and preserve its 
diagnostic; explicitly supplied NULL FIELDs remain valid. Preserve a terminal 
schema error instead of overwriting it with the partial-insert diagnostic.
   
   This changes new-write behavior introduced by #18880. Existing persisted 
time-only rows and WAL recovery are unchanged.
   
   ## Verification
   
   - Confirmed the new SQL regression fails against the unmodified 
upstream/master build.
   - Targeted Maven verification passed: 9 UTs and 7 ITs, zero 
failures/errors/skips, using 1 ConfigNode + 1 DataNode. Covers SQL and Tablet 
rejection, exact error text, no rows before/after flush, no devices created for 
rejected Tablets, and surviving valid FIELDs/rows.
   - After adding an explicit NULL row to the mixed SQL regression, recompiled 
the final IT class and reran `partialInsertSQLTest` with JUnitCore against the 
reactor-built nodes: passed.
   - `mvn spotless:apply -o -pl iotdb-core/datanode,integration-test 
-Pwith-integration-tests -Ddevelocity.off=true` — passed.
   - `mvn test-compile -o -DskipTests -Ddevelocity.off=true` — passed, full 
reactor.
   - `mvn test-compile -o -DskipTests -Pwith-zh-locale -Ddevelocity.off=true` — 
passed, full reactor.
   - `git diff --check` — passed.
   
   Targeted Maven verification command:
   
   ```bash
   mvn verify -o '-Dtest=AnalyzeUtilsTest,SchemaValidatorTest' 
-Dsurefire.failIfNoSpecifiedTests=false 
'-Dit.test=IoTDBInsertTableIT#testRejectedOnlySqlFieldDoesNotWriteTime+testRejectedOnlyFieldDoesNotWriteTime+testRejectedFieldKeepsValidField,IoTDBSessionRelationalIT#partialInsertSQLTest+insertAllFieldDataTypeMismatchTest+insertRelationalTabletWithAutoCastTest+insertRelationalRowWithAutoCastTest'
 -DfailIfNoTests=false -Dfailsafe.failIfNoSpecifiedTests=false -pl 
integration-test -am -PTableSimpleIT,with-integration-tests 
-Ddevelocity.off=true
   ```
   
   The pre-existing `insertRelationalRowWithAutoCastTest` invokes the Tablet 
helper; SQL coverage here comes from the actual SQL regression cases. Full 
suites, 1C3D, and crash/restart tests were not run.
   
   ---
   
   This PR has:
   
   - [x] been self-reviewed.
   - [x] added unit tests or modified existing tests to cover new code paths.
   - [x] added integration tests.
   - [x] been tested in a test IoTDB cluster (1 ConfigNode + 1 DataNode).
   


-- 
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