[
https://issues.apache.org/jira/browse/CALCITE-4087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17144857#comment-17144857
]
Ruben Q L commented on CALCITE-4087:
------------------------------------
[~julianhyde] thanks for starting this evolution.
I have one question, it might be interesting for some downstream projects to
have this Hoist feature, but applied on a "logical plan" level (RelNode) rather
than at SQL String level. Should we consider this feature in the design of the
current ticket (although it may be addressed as a separate ticket)?
> Hoist, a utility to replace literals in a SQL string with placeholders
> ----------------------------------------------------------------------
>
> Key: CALCITE-4087
> URL: https://issues.apache.org/jira/browse/CALCITE-4087
> Project: Calcite
> Issue Type: New Feature
> Components: babel
> Affects Versions: 1.23.0
> Reporter: Julian Hyde
> Assignee: Julian Hyde
> Priority: Major
>
> Add "Hoist", a utility to replace literals in a SQL string with placeholders.
> By default it uses Calcite's parser, but you can configure to use different
> quoting, casing, and also to use a different parser such as Babel for other
> dialects of SQL.
> It generates a data structure, {{Hoisted}}, that contains a map of where the
> literals occur within the SQL string. The Hoisted.substitute method generates
> an alternative SQL string, replacing the literals with a custom string.
> It does not call {{SqlNode.unparse}}, and therefore does not lose any of the
> original formatting.
> For more examples, see tests added to {{SqlParserTest}} and
> {{BabelParserTest}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)