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 <guxiaobo1...@qq.com.invalid> 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