You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2017/05/31 15:20:04 UTC

[jira] [Commented] (CALCITE-1817) Use of singleton CyclicMetadataException.INSTANCE hides original exception stack trace

    [ https://issues.apache.org/jira/browse/CALCITE-1817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16031331#comment-16031331 ] 

Julian Hyde commented on CALCITE-1817:
--------------------------------------

Since you're measuring performance right now: Is there a significant performance impact if you make it a non-singleton (i.e. instantiate each time)? If not, let's do that.

> Use of singleton CyclicMetadataException.INSTANCE hides original exception stack trace
> --------------------------------------------------------------------------------------
>
>                 Key: CALCITE-1817
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1817
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Remus Rusanu
>            Assignee: Julian Hyde
>            Priority: Minor
>
> The JaninoRelMetadataProvider GeneratedMetadataHandler_XXX classes throw a singleton CyclicMetadataException instance to signal a cycle detection. this is for performance, as the exception is used in this context as flow control (exception is expected and ignored by {{RelMdColumnUniqueness.areColumnsUnique(RelSubset rel,...)}}.
> But when the exception occurs in any other context (as I experienced in CALCITE-1816) it makes debugging problematic because the reported stack is one captured at some random initialization of the singleton in the past.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)