[
https://issues.apache.org/jira/browse/CALCITE-2662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16703710#comment-16703710
]
Julian Hyde edited comment on CALCITE-2662 at 12/3/18 12:48 AM:
----------------------------------------------------------------
Just because I did not see any test case about the presence of such
information. (No test fails setting a fixed null on that variable), so I am
thinking that Calcite is reconstructing the query from the AST.
I will add test cases around that variable.
If we want it in the Reader version I am thinking about adding a
Supplier<String> to provide optionally the string in case of error. This way on
the most common hot path (no error) I won't need to create the string.
was (Author: eolivelli):
Just because I did not see any test case about the presence of such
information. (No test fails setting a fixed null on that variable), so I am
thinking that Calcite is reconstructing the query from the AST.
I will add test cases around that variable.
If we want it in the Reader version I am thinking about adding a
Supplier<String> to provide optionally the steing in case of error. This way on
the moat common hot path (no error) I won't need to create the string
> Planner: allow parsing directly a stream instead of a java.lang.String
> ----------------------------------------------------------------------
>
> Key: CALCITE-2662
> URL: https://issues.apache.org/jira/browse/CALCITE-2662
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.17.0
> Reporter: Enrico Olivelli
> Assignee: Julian Hyde
> Priority: Major
> Fix For: 1.18.0
>
>
> In 1.17.0 the org.apache.calcite.tools.Planner interface only accept a
> java.lang.String as input.
> In order to reduce memory allocations and copies it will be useful that the
> planner could accept the query in a more 'raw' format.
> Creating a java.lang.String is very expensive, and if your "query" is coming
> from the network (think about a Netty Direct memory ByteBuf) you are forced
> to create a copy of the text of the query.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)