feat: enable prefilter in node js (#675)

enable prefiltering in node js, both native and remote
This commit is contained in:
Rob Meng
2023-12-01 16:49:10 -05:00
committed by Weston Pace
parent c1c3083b74
commit 59c25574f0
5 changed files with 30 additions and 3 deletions

View File

@@ -48,6 +48,8 @@ impl JsQuery {
.map(|s| s.value(&mut cx))
.map(|s| MetricType::try_from(s.as_str()).unwrap());
let prefilter = query_obj.get::<JsBoolean, _, _>(&mut cx, "_prefilter")?.value(&mut cx);
let is_electron = cx
.argument::<JsBoolean>(1)
.or_throw(&mut cx)?
@@ -69,7 +71,8 @@ impl JsQuery {
.nprobes(nprobes)
.filter(filter)
.metric_type(metric_type)
.select(select);
.select(select)
.prefilter(prefilter);
let record_batch_stream = builder.execute();
let results = record_batch_stream
.and_then(|stream| {