[
https://issues.apache.org/jira/browse/CALCITE-3305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16919080#comment-16919080
]
Julian Hyde commented on CALCITE-3305:
--------------------------------------
I agree that we should not have a public constructor that takes an argument
whose type is not public.
However, what you propose will not work. {{CalciteMetaImpl.closeStatement}}
casts the connection to {{CalciteConnectionImpl}}. There may be other code that
makes similar assumptions.
So, probably we should not have made CalciteMetaImpl's constructor public. We
did not intend for it to be sub-classed.
> Cannot subclass CalciteMetaImpl because CalciteConnectionImpl is not public
> ---------------------------------------------------------------------------
>
> Key: CALCITE-3305
> URL: https://issues.apache.org/jira/browse/CALCITE-3305
> Project: Calcite
> Issue Type: Bug
> Affects Versions: 1.20.0
> Reporter: Robert Yokota
> Priority: Minor
>
> I would like to subclass CalciteMetaImpl but its one constructor parameter of
> type CalciteConnectionImpl is not public. Perhaps it can be changed to be of
> type AvaticaConnection since it just passes the constructor parameter to its
> superclass constructor which is of type AvaticaConnection?
--
This message was sent by Atlassian Jira
(v8.3.2#803003)