Whenever I see "at Baz.bind(Unknown Source)" I am reminded how important it
is, when debugging, to set the System Property calcite.debug = true
https://github.com/apache/calcite/blob/a8a6569e6ba75efe9d5725c49338a7f181d3ab5c/core/src/main/java/org/apache/calcite/config/CalciteSystemProperty.java#L59

That will get you a good stack trace and will help you figure out the
generated code is attempting to do.

On Tue, Feb 22, 2022 at 5:35 AM xiaobo <[email protected]> wrote:

> we have static data conbination use cases , reflective shcema&nbsp; is the
> best choice!
>
>
>
> ---Original---
> From: "Gavin Ray"<[email protected]&gt;
> Date: Mon, Feb 21, 2022 01:52 AM
> To: "dev"<[email protected]&gt;;
> Subject: Re: dynamic reflective schema
>
>
> Ah, you don't want to use ReflectiveSchema, it's a simple schema type meant
> for easily making test schemas
>
> You want to extend from "AbstractSchema" and override the function
> "Map<String, Table&gt; getTableMap()"
> For the "Table" type, you probably want to use "JsonScannableTable"
>
> The CsvSchema example does exactly this, if you want to see an example
> implementation:
>
> https://github.com/apache/calcite/blob/4bc916619fd286b2c0cc4d5c653c96a68801d74e/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvSchema.java#L69-L106
>
> Hope this helps =)
>
>
>
> On Sat, Feb 19, 2022 at 11:03 PM xiaobo <[email protected]&gt;
> wrote:
>
> &gt; Hi,
> &gt; When using&nbsp; reflectiveSchema we must define a static Java class
> for the
> &gt; schema object, but in our use case the actual data to query is
> dynamic,
> &gt; define JAVA class for each data combination is impossible, we have an
> idea
> &gt; that can we make a JSONSchema which accepts a Map<String,
> &gt; List<JSONObject&gt;&gt;, so that each List will be mapped to a table
> , and each
> &gt; JSONObject mapped to a row, JSONObject keys will be column names. Is
> there
> &gt; anything similar with this?
> &gt;
> &gt;
> &gt; Regards

Reply via email to