schizophrenicmaniac commented on PR #40309: URL: https://github.com/apache/shardingsphere/pull/40309#issuecomment-6594780639
@terrymanu Thanks, all four are addressed in the latest commit. 1. Parameters matched to a NUMERIC/DECIMAL column are still described as VARCHAR, so the client sends the exact text and 12.34 doesn't get rounded. The prepared statement now records those parameter positions, and the execute and batch execute paths convert the text back to a number before routing. Integral values become Long, the same type INSERT ... VALUES binds them with through INT64, so a client using setLong(10) hits the same shard for writes and reads. Fractional values and values outside the long range become BigDecimal, and anything that isn't a number is left for the backend to reject. FirebirdExecuteStatementCommandExecutorTest checks that "10" reaches the query context as 10L, FirebirdServerPreparedStatementTest covers the conversion cases, and the prepare test checks which positions get recorded. TIME WITH TIME ZONE columns still go through as text since they're not converted. 2. CHAR casts are now capped at 32767 bytes, VARCHAR stays at 32765. CHAR(32767) CHARACTER SET ISO8859_1 is covered in assertDescribeCharacterCastParametersWithMultibyteLength. 3. Only `BLOB` and `BLOB ...` (sub type, segment size, abbreviated attributes) are treated as BLOB now, so CAST(? AS BLOB_NUMBER) falls back to VARCHAR like other unresolved domains. Added assertDescribeBlobAndDomainCastParameters. 4. Renamed the Optional.map parameter to `optional`. -- 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]
