strongduanmu commented on code in PR #30670:
URL: https://github.com/apache/shardingsphere/pull/30670#discussion_r1541134145
##########
kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/DataTypeConverter.java:
##########
@@ -45,7 +45,12 @@ public static Optional<SqlNode> convert(final
DataTypeSegment segment) {
if (null == segment) {
return Optional.empty();
}
- return Optional.of(new SqlDataTypeSpec(new
SqlBasicTypeNameSpec(Objects.requireNonNull(SqlTypeName.get(segment.getDataTypeName())),
segment.getDataLength().getPrecision(), SqlParserPos.ZERO),
- SqlParserPos.ZERO));
+ return Optional.of(new
SqlDataTypeSpec(getSqlBasicTypeNameSpec(segment), SqlParserPos.ZERO));
+ }
+
+ private static SqlBasicTypeNameSpec getSqlBasicTypeNameSpec(final
DataTypeSegment segment) {
Review Comment:
Hi @zihaoAK47, can you add e2e test case to cover this logic change?
--
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]