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

   @terrymanu Thanks, I pushed a commit for both.
   
   1. `ShardingSphereColumn` only keeps the JDBC type, and PgJDBC reports oid 
and int8 both as BIGINT, so the resolver can't tell the two apart without 
carrying the native type name in the table metadata. Instead, for a BIGINT 
column it now only decodes text with no minus sign and no leading zeros (an 
optional `+` and surrounding whitespace are still fine). For that text oid and 
int8 input give the same value, so `010`, `00` or `-1` stay as text and 
PostgreSQL reads them the way it did before. INTEGER columns keep the current 
rule, since PgJDBC only reports int4 as INTEGER. The cost is that an OID 0 
negative bigint sharding key still isn't routed, same as on master. I added a 
parameterized test on the first OID 0 Bind of `INSERT INTO foo_tbl (k) VALUES 
($1)` with `010`, `+010`, `00`, `-1` and an out-of-range value.
   
   2. `hasUnspecifiedParameterTypes` is back directly after the second 
`resolveParameterTypes` overload, ahead of the INSERT methods.


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