Every time I see "at Baz.bind” I am reminded that I should have chosen a better name for that class than ‘Baz’. :)
I figured ‘it’s generated, no one is ever going to know its name’. How wrong I was. The stack traces are all over the internet. Julian > On Feb 22, 2022, at 3:32 PM, Scott Reynolds <[email protected]> wrote: > > 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 is the >> best choice! >> >> >> >> ---Original--- >> From: "Gavin Ray"<[email protected]> >> Date: Mon, Feb 21, 2022 01:52 AM >> To: "dev"<[email protected]>; >> 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> 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]> >> wrote: >> >> > Hi, >> > When using reflectiveSchema we must define a static Java class >> for the >> > schema object, but in our use case the actual data to query is >> dynamic, >> > define JAVA class for each data combination is impossible, we have an >> idea >> > that can we make a JSONSchema which accepts a Map<String, >> > List<JSONObject>>, so that each List will be mapped to a table >> , and each >> > JSONObject mapped to a row, JSONObject keys will be column names. Is >> there >> > anything similar with this? >> > >> > >> > Regards
