[ https://issues.apache.org/jira/browse/HIVE-22929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17045797#comment-17045797 ]
Gopal Vijayaraghavan commented on HIVE-22929: --------------------------------------------- At least for a first pass, only the ones which use character constants, not regexes. {code} org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java: String escapedTokenText = curTok.getText().replaceAll("`", "``"); {code} is to be replaced with String.replace(), but for now we'll leave behind {code} org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java: String expr_no_tok = expr_flattened.replaceAll("tok_\\S+", ""); {code} for a later pass to be replaced by Pattern.compile() as a class constant, create a .matcher in each instance + .replaceAll(). > Performance: quoted identifier parsing uses throwaway Regex via > String.replaceAll() > ----------------------------------------------------------------------------------- > > Key: HIVE-22929 > URL: https://issues.apache.org/jira/browse/HIVE-22929 > Project: Hive > Issue Type: Bug > Reporter: Gopal Vijayaraghavan > Assignee: Krisztian Kasa > Priority: Major > Attachments: String.replaceAll.png > > > !String.replaceAll.png! > https://github.com/apache/hive/blob/master/parser/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g#L530 > {code} > '`' ( '``' | ~('`') )* '`' { setText(getText().substring(1, > getText().length() -1 ).replaceAll("``", "`")); } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)