You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Malte Bellmann (Jira)" <ji...@apache.org> on 2020/08/12 08:27:00 UTC

[jira] [Commented] (CALCITE-2317) getFunctions() showing empty

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

Malte Bellmann commented on CALCITE-2317:
-----------------------------------------

Currently an empty ResultSet is returned because org.apache.calcite.avatica.MetaImpl#getFunctions is not overwritten by org.apache.calcite.jdbc.CalciteMetaImpl

For example, getTables is overwritten. 

This is changed in [https://github.com/caespes/calcite/commit/06e2f0ab8c8e62ea96249707e11e1fb3680598b8]

One problem though: Materialized views are also returned as the are implemented as  org.apache.calcite.schema.impl.MaterializedViewTable.MaterializedViewTableMacro which is a function. 

We could filter these out with this: 

 
{code:java}
.where(fn -> !(fn instanceof MaterializedViewTable.MaterializedViewTableMacro))
{code}
Two questions to [~julianhyde] and others: 

1) do you see this as a problem?

2) would it have any negative effects if we would filter the returned functions this way?

 

 

> getFunctions() showing empty
> ----------------------------
>
>                 Key: CALCITE-2317
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2317
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Subbarao
>            Assignee: Malte Bellmann
>            Priority: Major
>         Attachments: CalciteWithOracle.java
>
>
> how to get all function names and procedure names in oracle database using calcite connection and schema.
> schema.getFunctionNames() return result is:[ ]
> Then i am try to retrieving DatabaseMetadata.getFunction().Here also it will be showing empty.
> Iam using calciResultSet ,AvaticaResultSet and ResultSet for getting functions and procedures but will be showing empty.
> Is it possible get all function names and procedure names from any database.
> But normal jdbc connection using DatabseMetaData properties  it retrive alll function names and procedure names.Why it will not retrive in calcite



--
This message was sent by Atlassian Jira
(v8.3.4#803005)