[jira] [Created] (CALCITE-4872) UNKNOWN erroneously treated as NULL

2021-11-02 Thread Will Noble (Jira)
Will Noble created CALCITE-4872:
---

 Summary: UNKNOWN erroneously treated as NULL
 Key: CALCITE-4872
 URL: https://issues.apache.org/jira/browse/CALCITE-4872
 Project: Calcite
  Issue Type: Bug
  Components: core
Reporter: Will Noble
Assignee: Will Noble


Call {{createWithNullability}} on an {{UnknownSqlType}} currently returns a 
{{NULL}} type. Furthermore, it's impossible to cast to unknown types, according 
to {{SqlTypeUtil.canCastFrom}}. This introduces a new {{SqlTypeName}} -- 
{{UNKNOWN}} -- which behaves like {{NULL}} in all ways except that it's no 
longer actually equal to {{NULL}}, and can always be cast to.



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


Re: Federated Query

2021-11-02 Thread Michael Mior
To run federated queries, you simply need to define each data source
in your model.json. You can see examples of model.json files for
various adapters in the test code for those adapters.

For example:

File - 
https://github.com/apache/calcite/blob/master/file/src/test/resources/model.json
Cassandra - 
https://github.com/apache/calcite/blob/master/cassandra/src/test/resources/model.json

You can add as many schemas as you want from different adapters into
the "schemas" array in model.json and all those schemas will be
available for you to write queries including joins across schemas.

--
Michael Mior
mm...@apache.org

Le lun. 1 nov. 2021 à 15:38, Yogendra Sharma  a écrit :
>
> Hi Team,
>
> I am exploring Apache Calcite to run federated queries on three different 
> databases. I could not find a working example anywhere on internet.
>
>  Can you guys confirm if it is possible and if yes, is there an example that 
> you can point me to?
>
> Thanks,
> Yogendra
>