924060929 commented on code in PR #68786:
URL: https://github.com/apache/doris/pull/68786#discussion_r4236662715
##########
fe/fe-connector/fe-connector-jdbc/src/main/java/org/apache/doris/connector/jdbc/client/JdbcTrinoConnectorClient.java:
##########
@@ -74,6 +74,8 @@ public ConnectorType jdbcTypeToConnectorType(JdbcFieldInfo
fieldInfo) {
return ConnectorType.of("DOUBLE");
case "date":
return ConnectorType.of("DATEV2");
+ case "uuid":
+ return ConnectorType.of("UUID");
Review Comment:
[P2] Render typed UUID literals for Trino JDBC predicates
This mapping now admits native UUID columns, but
`JdbcQueryBuilder.literalToSql` renders their UUID literal carrier as an
ordinary quoted string. For example, `WHERE u =
CAST('00112233-4455-6677-8899-aabbccddeeff' AS UUID)` reaches the connector as
a UUID column and UUID literal, yet the generated remote SQL is `WHERE "u" =
'00112233-4455-6677-8899-aabbccddeeff'`. Trino rejects that UUID/VARCHAR
comparison: [Trino 435
TypeCoercion](https://github.com/trinodb/trino/blob/435/core/trino-main/src/main/java/io/trino/type/TypeCoercion.java#L411-L424)
has no implicit coercion between them. IN and range predicates reuse the same
literal renderer. The write-side `CAST(? AS UUID)` does not cover scans. Please
render `CAST('...' AS UUID)` or a typed UUID literal for Trino, validate the
corresponding Presto path, and add a filtered UUID read test; alternatively
keep unsupported predicates local without pushing LIMIT. This is a gap in the
newly supported type (the merge base mapped Trino JDBC
UUID to UNSUPPORTED), rather than a claim that an already-supported query
regressed.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]