thanks, I solved it in programmatic way like this : schema.add("view",
ViewTable.viewMacro(schema, viewSql, ImmutableList.<String>of(), false));and
it's OK.
------------------------------------------------------------------发件人:Julian
Hyde <[email protected]>发送时间:2017年7月5日(星期三) 09:30收件人:dev
<[email protected]>; 魏阔(山遥) <[email protected]>主 题:Re:
Unrecognized field "mutable" (class org.apache.calcite.model.JsonCustomSchema),
not marked as ignorable
“mutable” is not an allowed field of the Schema JSON object. I see the javadoc
for SchemaFactory includes it in an example, but that example is wrong.
Julian
> On Jul 3, 2017, at 4:34 AM, 魏阔 <[email protected]> wrote:
>
> hi, all: I am using calcite-core 1.13.0, and defining schema in json file
>like this: .......
> "name": "SALES",
> "type": "custom",
> "factory": "org.apache.calcite.adapter.csv.CsvSchemaFactory",
> "mutable": true,
> "operand": {
> directory: "target/test-classes/sales"
> } ........
> but error happens: Unrecognized field "mutable" (class
>org.apache.calcite.model.JsonCustomSchema), not marked as ignorable (9 known
>properties: "cache", "path", "materializations", "operand", "factory", "name",
>"lattices", "tables", "functions"])
> at [Source: target/classes/model.json; line: 27, column: 22] (through
>reference chain:
>org.apache.calcite.model.JsonRoot["schemas"]->java.util.ArrayList[2]->org.apache.calcite.model.JsonCustomSchema["mutable"])
>
> is there anything wrong? or is there other way to do so?
> thanks
> shanyao
>