-
Notifications
You must be signed in to change notification settings - Fork 688
Open
Milestone
Description
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
Reactions are currently unavailable