[
https://issues.apache.org/jira/browse/CALCITE-2537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16605062#comment-16605062
]
Julian Hyde commented on CALCITE-2537:
--------------------------------------
By "assertions are enabled', do you mean the "-ea" command-line flag, which
makes the {{assert}} command work?
Calcite uses the {{assert}} command for some lightweight checking, but we also
have a lot of checking that cannot be disabled, such as
{{Objects.requireNonNull}}. So, users don't expect enabling or disabling
assertions to affect running time very much.
I take your point that enabling debugging in the log level, in order to call
VolcanoPlanner.validate, causes extra logging that makes the program run much
slower. So maybe it should be associated with a lower logging level, that
generates less tracing?
> Make sure assertions are enabled before calling VolcanoPlanner#validate
> -----------------------------------------------------------------------
>
> Key: CALCITE-2537
> URL: https://issues.apache.org/jira/browse/CALCITE-2537
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: Laurent Goujon
> Assignee: Julian Hyde
> Priority: Minor
>
> {{VolcanoPlanner#validate()}} is invoked if the log level is debug or lower.
> But considering how enabling this method slows down the whole planning
> (changing it for running tests make the whole duration several hours), and
> this is some kind of assertion (since it throws {{AssertionError}}, I would
> suggest to only enable it when assertions are enabled
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)