Hi,

I know that Oracle uses lax by default [1] but I don't remember what other
DBMS do.

In any case adopting a default mode sounds like a reasonable thing to do.

Best,
Stamatis

[1] https://docs.oracle.com/database/121/ADXDB/json.htm#ADXDB6259


On Mon, Apr 20, 2020, 7:28 AM Chunwei Lei <chunwei.l...@gmail.com> wrote:

> Thank you for proposing this, Forward.
>
>  I am wondering whether it is really useful for users who want to use these
> functions
> since they probably know what the syntax is. But personally I would like to
> have the
> default mode since it is more convenient.
>
>
> Best,
> Chunwei
>
>
> On Sun, Apr 19, 2020 at 9:51 AM Forward Xu <forwardxu...@gmail.com> wrote:
>
> > hi everyone, I recently found some discussable optimizations when I
> > contributed the flip-90 [1] Json functions:
> > The current json functions in calcite: JSON_EXISTS, JSON_VALUE,
> JSON_QUERY,
> > JSON_OBJECT, JSON_OBJECTAGG, JSON_ARRAY, JSON_ARRAYAGG and IS JSON
> > predication functions. These functions are implemented based on the SQL
> > 2016-2017 standard [2]. According to this standard, the path of the json
> > function must be used in one of strict or lax mode. such as:
> > json_exists ('{"foo": "bar"}', 'lax $ .foo') or
> > json_exists ('{"foo": "bar"}', 'strict $ .foo')
> > Can we give a default mode to simplify the use of lax and strict. For
> > example, we default to lax mode. In this way, the use of our json
> function
> > can be simplified to:
> > json_exists ('{"foo": "bar"}', '$ .foo')
> > Implementation idea improvement JsonFunctions jsonApiCommonSyntax path
> > judgment to increase the default lax mode logic.
> > Of course, these changes are not described in SQL2016-2017.
> > I want to hear your opinion here.
> >
> > [1]
> >
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=141724550
> > [2]
> >
> >
> https://standards.iso.org/ittf/PubliclyAvailableStandards/c067367_ISO_IEC_TR_19075-6_2017.zip
> >
>

Reply via email to