Zoltan Borok-Nagy has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/23812 )
Change subject: IMPALA-14551: Fix hang on Unicode complex expressions in alias mapping ...................................................................... IMPALA-14551: Fix hang on Unicode complex expressions in alias mapping When a complex expression with Unicode letters is selected without an alias, SelectListItem.toColumnLabel() falls back to expr.toSql().toLowerCase(), so HiveLexer validates a backticked, lowercased toSql() alias and can loop indefinitely on ANTLR 3.3 because Lexer.nextToken() never calls recover(). Root cause: ANTLR 3.3's Lexer.nextToken() does not call recover() for RecognitionException, causing infinite retry on same input position. Fix: Upgrade antlr-runtime from 3.3 to 3.5.3. In ANTLR 3.4+, recover() calls input.consume() to advance past problematic characters. Note: This issue does NOT occur with CDP Hive (which includes HIVE-19064), but affects Apache Hive 3.1.3 without the patch. This fix ensures compatibility with unpatched Hive versions. Testing: - Added testHiveNeedsQuotesUnicodeComplexExpression with timeout Change-Id: I175de0c3cd958a03e5ca02590a8b84ca6e674f3d Reviewed-on: http://gerrit.cloudera.org:8080/23812 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M fe/pom.xml M fe/src/test/java/org/apache/impala/analysis/ToSqlUtilsTest.java 2 files changed, 17 insertions(+), 1 deletion(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/23812 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I175de0c3cd958a03e5ca02590a8b84ca6e674f3d Gerrit-Change-Number: 23812 Gerrit-PatchSet: 5 Gerrit-Owner: Anonymous Coward <[email protected]> Gerrit-Reviewer: Anonymous Coward <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
