You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by 魏阔 <we...@alibaba-inc.com> on 2017/07/03 11:34:45 UTC

Unrecognized field "mutable" (class org.apache.calcite.model.JsonCustomSchema), not marked as ignorable

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


Re: Unrecognized field "mutable" (class org.apache.calcite.model.JsonCustomSchema), not marked as ignorable

Posted by Julian Hyde <jh...@apache.org>.
“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, 魏阔 <we...@alibaba-inc.com> 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
> 


回复:Unrecognized field "mutable" (class org.apache.calcite.model.JsonCustomSchema), not marked as ignorable

Posted by "魏阔(山遥)" <we...@alibaba-inc.com>.
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 <jh...@apache.org>发送时间:2017年7月5日(星期三) 09:30收件人:dev <de...@calcite.apache.org>; 魏阔(山遥) <we...@alibaba-inc.com>主 题: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, 魏阔 <we...@alibaba-inc.com> 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
>