Skip to content

Commit 71fe4be

Browse files
authored
[core][fix] Add whitespace to operation (#2068)
1 parent 45961cd commit 71fe4be

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fixcore/fixcore/db/arango_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ def load_time_series(
890890
parts = []
891891
for f in group_filter:
892892
bv = ctx.add_bind_var(f.value)
893-
parts.append(f"d.group.{f.name}{f.op}@{bv}")
893+
parts.append(f"d.group.{f.name} {f.op} @{bv}")
894894
query += f" FILTER {' AND '.join(parts)}"
895895
time_slot = ctx.next_crs()
896896
slotter = int(granularity.total_seconds())

fixcore/tests/fixcore/db/arango_query_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def test_load_time_series() -> None:
358358
"ts", "foo", now - (24 * one_hour), now, one_hour, group_by=["a", "b"], group_filter=[P("a").eq("a")]
359359
)
360360
assert (
361-
q == "LET m1 = ( FOR d in `ts` FILTER d.ts==@b0 AND d.at>=@b1 AND d.at<@b2 FILTER d.group.a==@b3 "
361+
q == "LET m1 = ( FOR d in `ts` FILTER d.ts==@b0 AND d.at>=@b1 AND d.at<@b2 FILTER d.group.a == @b3 "
362362
"LET m0 = (FLOOR(d.at / @b4) * @b4) + @b5 "
363363
"COLLECT group_slot=m0, complete_group=d.group "
364364
"AGGREGATE slot_avg = AVG(d.v) RETURN {at: group_slot, group: complete_group, v: slot_avg} )\n "

0 commit comments

Comments
 (0)