You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@asterixdb.apache.org by abdullah alamoudi <ba...@gmail.com> on 2017/11/28 03:24:01 UTC

Change in merge policy syntax

Dear devs,
We would like to get your input on changing the syntax of the merge policy definition.

Current syntax:
<USING> <COMPACTION> <POLICY> prefix_merge (("number"="123"),("size"="456"));

Proposed syntax
<WITH> {"compaction policy": {"name": "prefix_merge", "parameters": {"number": 123,"size": 456}}};

Advantages:
1. Compaction and policy are not key words anymore.
2. Use a JSON for key value pairs instead of a strange syntax.

Thoughts?

Re: Change in merge policy syntax

Posted by Mike Carey <dt...@gmail.com>.
+1

Could you share the resulting full proposed BNF rule for the CREATE 
DATASET statement?


On 11/27/17 7:24 PM, abdullah alamoudi wrote:
> Dear devs,
> We would like to get your input on changing the syntax of the merge policy definition.
>
> Current syntax:
> <USING> <COMPACTION> <POLICY> prefix_merge (("number"="123"),("size"="456"));
>
> Proposed syntax
> <WITH> {"compaction policy": {"name": "prefix_merge", "parameters": {"number": 123,"size": 456}}};
>
> Advantages:
> 1. Compaction and policy are not key words anymore.
> 2. Use a JSON for key value pairs instead of a strange syntax.
>
> Thoughts?


Re: Change in merge policy syntax

Posted by Ian Maxon <im...@uci.edu>.
Makes sense to me, would we extend it to the other cases where we use
the parenthesis syntax as well (eventually)?

On Mon, Nov 27, 2017 at 7:31 PM, Wail Alkowaileet <wa...@gmail.com> wrote:
> +1
>
> On Nov 27, 2017 19:24, "abdullah alamoudi" <ba...@gmail.com> wrote:
>
>> Dear devs,
>> We would like to get your input on changing the syntax of the merge policy
>> definition.
>>
>> Current syntax:
>> <USING> <COMPACTION> <POLICY> prefix_merge (("number"="123"),("size"="
>> 456"));
>>
>> Proposed syntax
>> <WITH> {"compaction policy": {"name": "prefix_merge", "parameters":
>> {"number": 123,"size": 456}}};
>>
>> Advantages:
>> 1. Compaction and policy are not key words anymore.
>> 2. Use a JSON for key value pairs instead of a strange syntax.
>>
>> Thoughts?

Re: Change in merge policy syntax

Posted by Till Westmann <ti...@apache.org>.
+10

I’ve been hoping that we’d move from the (("key"="value"),(…)) syntax
to an JSON-like syntax that aligns with our data model for years - but
it never seemed to be the right time. I hope that this is the first
step and that we’ll move to this syntax for other parameters as well.

Cheers,
Till

On 27 Nov 2017, at 19:31, Wail Alkowaileet wrote:

> +1
>
> On Nov 27, 2017 19:24, "abdullah alamoudi" <ba...@gmail.com> wrote:
>
>> Dear devs,
>> We would like to get your input on changing the syntax of the merge policy
>> definition.
>>
>> Current syntax:
>> <USING> <COMPACTION> <POLICY> prefix_merge (("number"="123"),("size"="
>> 456"));
>>
>> Proposed syntax
>> <WITH> {"compaction policy": {"name": "prefix_merge", "parameters":
>> {"number": 123,"size": 456}}};
>>
>> Advantages:
>> 1. Compaction and policy are not key words anymore.
>> 2. Use a JSON for key value pairs instead of a strange syntax.
>>
>> Thoughts?

Re: Change in merge policy syntax

Posted by Wail Alkowaileet <wa...@gmail.com>.
+1

On Nov 27, 2017 19:24, "abdullah alamoudi" <ba...@gmail.com> wrote:

> Dear devs,
> We would like to get your input on changing the syntax of the merge policy
> definition.
>
> Current syntax:
> <USING> <COMPACTION> <POLICY> prefix_merge (("number"="123"),("size"="
> 456"));
>
> Proposed syntax
> <WITH> {"compaction policy": {"name": "prefix_merge", "parameters":
> {"number": 123,"size": 456}}};
>
> Advantages:
> 1. Compaction and policy are not key words anymore.
> 2. Use a JSON for key value pairs instead of a strange syntax.
>
> Thoughts?