[
https://issues.apache.org/jira/browse/HIVE-22929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17047329#comment-17047329
]
Zoltan Haindrich edited comment on HIVE-22929 at 2/28/20 8:50 AM:
------------------------------------------------------------------
okay; one more note: I think the reason that replaceAll lit up on the profiler
might have other backgrounds beyond the pure weight of the function;
we have a few syn-preds in the grammar - those can blow up parsing time quite
easily - and may overstress things like a replaceAll;
I it would be helpfull to get a counter *#[replaceAll calls at the key
location]* and compare it against *#[` quoted things in the input query]*
was (Author: kgyrtkirk):
okay; one more note: I think the reason that replaceAll lit up on the profiler
might have other backgrounds beyond the pure weight of the function;
we have a few syn-preds in the grammar - those can blow up parsing time quite
easily - and may overstress things like a replaceAll;
I it would be helpfull to get a counter #{replaceAll calls at the key location}
and compare it against #{` quoted things in the input query}
> 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: HIVE-22929.1.patch, 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)