zhuangchong commented on code in PR #1264:
URL: https://github.com/apache/incubator-paimon/pull/1264#discussion_r1212649083
##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/FlinkCatalog.java:
##########
@@ -575,7 +582,26 @@ public static Schema fromCatalogTable(CatalogTable
catalogTable) {
private static Map<String, String> getColumnComments(CatalogTable
catalogTable) {
return catalogTable.getUnresolvedSchema().getColumns().stream()
.filter(c -> c.getComment().isPresent())
- .collect(Collectors.toMap(UnresolvedColumn::getName, c ->
c.getComment().get()));
+ .collect(
+ Collectors.toMap(
+ UnresolvedColumn::getName,
+ c -> {
+ String comment = c.getComment().get();
+ if
(comment.toUpperCase().startsWith("U&'")) {
+ try {
+ SqlParser parser =
SqlParser.create(comment + "'");
Review Comment:
@wxplovecc This method is good, but we can't force all users to write like
this `... COMMENT _utf8'更新时间'`
--
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]