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

   Table-model batch RPCs could be returned as success when an individual SQL 
statement produced an error `TSStatus` instead of throwing. This caused JDBC 
`executeBatch()` to miss the failure. The server now summarizes returned error 
statuses as `MULTIPLE_ERROR` while continuing later batch entries. For a 
partially failed batch that changes the default database, the response appends 
`USE_OR_DROP_DB` metadata after all per-statement statuses so the JDBC driver 
can synchronize the cached schema without shifting update counts.
   
   Example, with `test2.sensor` already created:
   
   ```sql
   USE test2;
   INSERT INTO sensor(time, device_id, reading) VALUES (1, 'bad', 'not_an_int');
   INSERT INTO sensor(time, device_id, reading) VALUES (2, 'ok', 7);
   ```
   
   `executeBatch()` throws `BatchUpdateException` with update counts 
`[SUCCESS_STATUS, METADATA_ERROR, SUCCESS_STATUS]`; the connection schema is 
`test2`, and the third entry executes.
   


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