snuyanzin commented on code in PR #27431:
URL: https://github.com/apache/flink/pull/27431#discussion_r2701088914
##########
flink-table/flink-sql-parser/src/main/java/org/apache/flink/sql/parser/type/ExtendedSqlRowTypeNameSpec.java:
##########
@@ -121,7 +121,8 @@ public void unparse(SqlWriter writer, int leftPrec, int
rightPrec) {
if (p.right.getNullable() != null && !p.right.getNullable()) {
writer.keyword("NOT NULL");
}
- if (comments.get(i) != null) {
+ // With bounds check - prevents IndexOutOfBoundsException
+ if (i < comments.size() && comments.get(i) != null) {
Review Comment:
is the logic correctly working if some fields is the middle without comments
and fields in the beginning and end are with comments?
--
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]