[ https://issues.apache.org/jira/browse/CALCITE-2662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16703362#comment-16703362 ]
Enrico Olivelli commented on CALCITE-2662: ------------------------------------------ [~julianhyde] I have added a Proof-of-concept commit on top of the PR in which I am skipping the "old" constructor of SQLParser and so I am not retaining any more a reference to the original query. All tests in Calcite are passing, this makes me think that that information is not useful How does it sounds to you ? see https://github.com/apache/calcite/pull/906/commits/a22cfb9cc13a3dc8f6de53880870337fb01e6cbe > 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 > > 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)