Skip to content

DEEP DISTINCT #282

@agershun

Description

@agershun

I think we can add option flag should AlaSQL make
a) slow deep distrinct operation for nested JSON objects
b) fast distinct operations which will check only first level objects

We can use flag:

SET DEEPDISTINCT ON

to turn it on.

For example:

    var data = [{a:{b:1}},{a:{b:1}}];
    alasql('SET DEEPDISTINCT ON');
    var res = alasql('SELECT DISTINCT * FROM ?',[data]);
    // returns [{a:{b:1}];
    alasql('SET DEEPDISTINCT OFF');
    var res = alasql('SELECT DISTINCT * FROM ?',[data]);
    // returns [{a:{b:1}},{a:{b:1}}] - because objects {b:!} are different

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions