uwdata / arquero

Query processing and transformation of array-backed data tables.
https://idl.uw.edu/arquero
BSD 3-Clause "New" or "Revised" License
1.22k stars 64 forks source link

Table expressions do not support underscores as numeric separators in numeric literals #320

Open ghing opened 1 year ago

ghing commented 1 year ago

JavaScript now supports underscores as separators in numeric literals, however, Arquero table expressions do not support this.

Replication code:

let dt = aq.table({
  'col1': [1_000, 2_001, 3_123],
});
dt = dt.derive({
  col1_gt_2k: d => d.col1 > 2_000
});

Expected result:

dt has the same value as if the code execute was:

dt = dt.derive({
  col1_gt_2k: d => d.col1 > 2000
})

Observed result:

The following error is thrown:

Error: Expression parse error: d => d.col1 > 2_000