[
https://issues.apache.org/jira/browse/CALCITE-4482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jiatao Tao updated CALCITE-4482:
--------------------------------
Attachment: image-2021-02-01-20-52-54-892.png
> "ImmutableBeans.create" has performance issue
> ---------------------------------------------
>
> Key: CALCITE-4482
> URL: https://issues.apache.org/jira/browse/CALCITE-4482
> Project: Calcite
> Issue Type: Bug
> Reporter: Jiatao Tao
> Assignee: Jiatao Tao
> Priority: Major
> Attachments: image-2021-02-01-15-42-46-942.png,
> image-2021-02-01-15-45-11-863.png, image-2021-02-01-15-46-08-056.png,
> image-2021-02-01-15-47-31-577.png, image-2021-02-01-20-52-54-892.png
>
>
> We are doing the stressing test, and we found SqlNode#toString's time is
> unusually high, seems the call is all from SqlNode#toString, we can reduce
> the useless call of "ImmutableBeans.create" to reduce the time:
> My proposal is to extra default SqlWriterConfig to SqlNode and
> SqlNode#toString use this static field.
>
> {code:java}
> public static final SqlWriterConfig DEFAULT_SQL_WRITER_CONFIG =
> SqlPrettyWriter.config().withDialect(AnsiSqlDialect.DEFAULT)
> .withAlwaysUseParentheses(false)
> .withSelectListItemsOnSeparateLines(false)
> .withUpdateSetListNewline(false)
> .withIndentation(0);
> {code}
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)