snuyanzin commented on code in PR #26719: URL: https://github.com/apache/flink/pull/26719#discussion_r2193192069
########## flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala: ########## @@ -1423,7 +1423,7 @@ object ScalarOperatorGens { | $resultTerm = $nullTerm ? $defaultValue : $arrayGet; | break; | default: - | throw new RuntimeException("Array has more than one element."); + | throw new TableRuntimeException("Array has more than one element."); Review Comment: this is a legacy way of doing tests which is a way more limited ... you can use a more modern way, for instance in `CollectionFunctionsITCase` add a test for this function and among others have something like ```java .testSqlRuntimeError("element(ARRAY[1, 2])", TableRuntimeException.class, "Array has more than one element.") ``` this will test the 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org