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

Josh Elser commented on CALCITE-836:
------------------------------------

bq.  Rather than adding an API to DatabaseMetaData, maybe we can make clever 
use of the unwrap method, like this:

You think unwrap(Properties) would be preferable to making our own 
Avatica-specific interface extension to DatabaseMetaData? Reading your code 
snippet made me think about something like the following...

{code}
Connection connection;
DatabaseMetaData metaData = connection.getMetaData();
AvaticaDatabaseMetaData avaticaMetaData = 
metaData.unwrap(AvaticaMetaData.class);
String serverVersion = avaticaMetaData.getServerVersion();
{code}

In this case, I think we could make {{AvaticaMetaData}} an interface and make 
the current {{AvaticaMetaData}} into an {{AvaticaMetaDataImpl}}?

> Provide a way for the Avatica client to query the server versions
> -----------------------------------------------------------------
>
>                 Key: CALCITE-836
>                 URL: https://issues.apache.org/jira/browse/CALCITE-836
>             Project: Calcite
>          Issue Type: New Feature
>          Components: avatica
>            Reporter: Holman Lan
>            Assignee: Josh Elser
>             Fix For: avatica-1.8.0
>
>
> Currently there doesn't seem to be a way for Avatica clients to find out the 
> Avatica RPC protocol version and versions of other server components.
> The use case here is to allow the Apache Phoenix clients to request the 
> Avatica version, Phoenix version and HBase version from the Phoenix Query 
> Server.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to