xxhannah commented on code in PR #7343:
URL: https://github.com/apache/inlong/pull/7343#discussion_r1102403244
##########
inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/parser/impl/FlinkSqlParser.java:
##########
@@ -635,11 +638,15 @@ private void parseFieldRelations(List<FieldInfo> fields,
Map<String, FieldRelation> fieldRelationMap, StringBuilder sb) {
for (FieldInfo field : fields) {
FieldRelation fieldRelation =
fieldRelationMap.get(field.getName());
+ FormatInfo fieldFormatInfo = field.getFormatInfo();
if (fieldRelation == null) {
- String targetType =
TableFormatUtils.deriveLogicalType(field.getFormatInfo()).asSummaryString();
+ String targetType =
TableFormatUtils.deriveLogicalType(fieldFormatInfo).asSummaryString();
sb.append("\n CAST(NULL as ").append(targetType).append(")
AS ").append(field.format()).append(",");
continue;
}
+ boolean complexType = fieldFormatInfo instanceof RowFormatInfo
Review Comment:
It's a good suggestion, but ```FieldInfoUtils.java``` is in
```manager-pojo``` and ```FlinkSqlParser.java``` is in ```sort-core```, I don't
think it's suitable to import ```manager-pojo``` into ```sort-core```. Any
other good idea for this? ^_^
--
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]