schizophrenicmaniac commented on PR #40212: URL: https://github.com/apache/shardingsphere/pull/40212#issuecomment-6384208164
@terrymanu Thanks, I pushed a commit for the JOIN USING one. 2. Columns named in a JOIN USING list, or merged by a NATURAL JOIN, no longer resolve anything, so `WHERE id=$1` over `foo_tbl LEFT JOIN bar_tbl USING (id)` keeps `$1` as text and PostgreSQL picks the merged type the same way it does on master. The check goes by column name, case-insensitively, over every join in the statement, so a qualified `a.id` with that name is also left as text. There are tests for a `LEFT JOIN ... USING (id)` and a `NATURAL JOIN`. 1. I haven't changed anything for the domain case. `PostgreSQLMetaDataLoader` reads `udt_name`, which for a domain column is the base type, so `ShardingSphereColumn` ends up with `Types.INTEGER` and the resolver can't tell the domain apart from a plain int4 column. Telling them apart would mean carrying the domain or native type name in the column metadata, which reaches well beyond this Bind path. For what it's worth, master already sends INT4 for this statement from the second Bind on, because `resolveParameterTypes` caches the int4 type the backend reports for `$1`, so the custom operator is already selected there after the first execution. -- 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]
