Re: [DISCUSS] Allow HOCON as a format for Calcite models and config files

2016-06-08 Thread Julian Hyde
I have logged https://issues.apache.org/jira/browse/CALCITE-1280 to capture this discussion. I think HOCON and YAML are both strong candidates if someone wanted to contribute them (in addition to JSON of course). > On Jun 6, 2016, at 6:36 PM,

Re: [DISCUSS] Allow HOCON as a format for Calcite models and config files

2016-06-06 Thread Josh Elser
+1 Michael Mior wrote: I think this would be the ideal approach assuming there isn't too much overhead in maintaining different parsers and keeping them in sync. We wouldn't want to end up in the situation where the parsers start drifting and it could end up being a lot of work to maintain test

Re: [DISCUSS] Allow HOCON as a format for Calcite models and config files

2016-06-06 Thread Michael Mior
I think this would be the ideal approach assuming there isn't too much overhead in maintaining different parsers and keeping them in sync. We wouldn't want to end up in the situation where the parsers start drifting and it could end up being a lot of work to maintain test cases for all the differen

Re: [DISCUSS] Allow HOCON as a format for Calcite models and config files

2016-06-06 Thread Julian Hyde
YAML isn’t an aside — thanks for raising it. Along with JSON and HOCON, YAML is another viable language for writing model files. I think any of these formats would plug into ModelHandler quite easily, because they all produce data in the JSON model. And performance isn’t important, because the

Re: [DISCUSS] Allow HOCON as a format for Calcite models and config files

2016-06-06 Thread Josh Elser
Cool :) Justification enough for me. Jacques Nadeau wrote: Just to clarify, my responses were in regards to HOCON. On Mon, Jun 6, 2016 at 1:53 PM, Jacques Nadeau wrote: We use it a lot in Drill for configuration files. It serves this purpose well. (We especially leverage the caoncatenation

Re: [DISCUSS] Allow HOCON as a format for Calcite models and config files

2016-06-06 Thread Michael Mior
As an aside if we want a human-readable configuration format that's more flexible than JSON I would personally prefer YAML. It's much more standard than any of the JSON variants and can encode all the necessary structures. -- Michael Mior michael.m...@gmail.com 2016-06-06 16:51 GMT-04:00 Michael

Re: [DISCUSS] Allow HOCON as a format for Calcite models and config files

2016-06-06 Thread Jacques Nadeau
Just to clarify, my responses were in regards to HOCON. On Mon, Jun 6, 2016 at 1:53 PM, Jacques Nadeau wrote: > We use it a lot in Drill for configuration files. It serves this purpose > well. (We especially leverage the caoncatenation/overlay capbilities.) > > I haven't thought enough about it

Re: [DISCUSS] Allow HOCON as a format for Calcite models and config files

2016-06-06 Thread Jacques Nadeau
We use it a lot in Drill for configuration files. It serves this purpose well. (We especially leverage the caoncatenation/overlay capbilities.) I haven't thought enough about its use in this case to have an opinion one way or the other. On Mon, Jun 6, 2016 at 1:33 PM, Josh Elser wrote: > At a g

Re: [DISCUSS] Allow HOCON as a format for Calcite models and config files

2016-06-06 Thread Michael Mior
Right now none of the examples are strictly JSON anyway. There are several different JSON supersets that we could potentially use. It might be nice to pick one so there's at least some kind of standard. https://hjson.org/ https://github.com/timjansen/hanson http://json5.org/ -- Michael Mior micha

Re: [DISCUSS] Allow HOCON as a format for Calcite models and config files

2016-06-06 Thread Josh Elser
At a glance, it looks like it would be a nice improvement over JSON with the ability to still just provide json. Haven't had any practical experience with it though (e.g. does it work as advertised). Looks like they recommend ".conf" as the suffix The JSON superset is called "Human-Optimized C

[DISCUSS] Allow HOCON as a format for Calcite models and config files

2016-06-06 Thread Julian Hyde
HOCON is a superset of JSON that makes it easier for humans to edit JSON files. For example, it supports multi-line strings, file inclusion, comments. Should Calcite support HOCON in addition to strict JSON for model files any other config files? What should be the suffix of such files? https:/