[
https://issues.apache.org/jira/browse/FLINK-22318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17333351#comment-17333351
]
todd commented on FLINK-22318:
------------------------------
hi, [~jark]
Through today’s discussion in Pr, i think there are two points that need to be
adjusted.
1. validation of expressions of computed and watermark.
When processing convertRenameColumn , I used the following method to verify the
original expression.
```
HashMap<String, RelDataType> newNameToTypeMap = new LinkedHashMap<>();
nameToTypeMap.putAll(newPhysicalFieldNamesToTypes);
nameToTypeMap.putAll(newMetadataFieldNamesToTypes);
try {
// validate origin expression
sqlValidator.validateParameterizedExpression(expression, newNameToTypeMap);
} catch (SqlValidatorException exception) {
throw new ValidationException("rename column name error, the field information
is referenced in the %s expression.",expression );
}
```
2. build AlterTableRenameColumnOperation instead of AlterTableSchemaOperation.
> Support RENAME column name for ALTER TABLE statement
> ----------------------------------------------------
>
> Key: FLINK-22318
> URL: https://issues.apache.org/jira/browse/FLINK-22318
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / API
> Reporter: Jark Wu
> Priority: Major
> Labels: pull-request-available
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)