schizophrenicmaniac commented on PR #40309:
URL: https://github.com/apache/shardingsphere/pull/40309#issuecomment-6460886721

   @terrymanu Thanks, pushed fixes for all five.
   
   1. I didn't describe DECIMAL/NUMERIC with a scale, because the execute side 
can't use it yet: FirebirdBlrRowMetadata skips the scale byte in the client's 
BLR, and the INT64/INT128 values are read as plain integers. If prepare said 
INT64 with scale -2, Jaybird would send 12.34 as 1234 and the proxy would bind 
1234. So a CAST to DECIMAL or NUMERIC is now described as VARCHAR(32765). The 
client sends the value as text and the backend CAST applies the declared 
precision and scale, so 12.34 and values over 18 digits go through unchanged. 
Proper scaled numeric binding would mean changing the protocol execute path, 
which I'd rather keep out of this PR.
   2. FLOAT(p) with p > 24 is now described as DOUBLE PRECISION. FLOAT and 
FLOAT(24) stay single precision.
   3. TIME WITH TIME ZONE also falls back to VARCHAR now, since there's no 
TIME_TZ decoder on the execute side. Unrecognised type names now always use the 
32765 length rather than the declared precision.
   4. Renamed the ifPresent parameters to selectStatement and combine, and the 
local to params.
   5. Fixed both wrapping positions.
   
   assertDescribeExactNumericAndTimeWithTimeZoneCastParametersAsVarchar covers 
DECIMAL(10,2), NUMERIC(38,4) and TIME WITH TIME ZONE with LENGTH, and 
assertDescribeFloatCastParametersByPrecision covers FLOAT(24) and FLOAT(53).


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