From 6d51ab9d69f62b3988b3f9e7d127ccdc88e30bd5 Mon Sep 17 00:00:00 2001 From: Aditya Hegde Date: Mon, 30 Dec 2024 09:37:16 +0530 Subject: [PATCH] Adding mapping for old rill-<> format --- runtime/pkg/rilltime/rilltime.go | 33 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/runtime/pkg/rilltime/rilltime.go b/runtime/pkg/rilltime/rilltime.go index e79c05ab367..4babc1ff6f5 100644 --- a/runtime/pkg/rilltime/rilltime.go +++ b/runtime/pkg/rilltime/rilltime.go @@ -32,22 +32,23 @@ var ( }) daxNotations = map[string]string{ // Mapping for our old rill- syntax - "TD": "", - "WTD": "", - "MTD": "", - "QTD": "", - "YTD": "", - "PP": "", - "PD": "", - "PW": "", - "PM": "", - "PQ": "", - "PY": "", - "PDC": "", - "PWC": "", - "PMC": "", - "PQC": "", - "PYC": "", + "TD": "0d,latest", + "WTD": "0W,latest", + "MTD": "0M,latest", + "QTD": "0Q,latest", + "YTD": "0Y,latest", + "PDC": "-1d,0d", + "PWC": "-1W,0W", + "PMC": "-1M,0M", + "PQC": "-1Q,0Q", + "PYC": "-1Y,0Y", + // TODO: comparison + "PP": "", + "PD": "-1d,0d", + "PW": "-1W,0W", + "PM": "-1M,0M", + "PQ": "-1Q,0Q", + "PY": "-1Y,0Y", } rillTimeParser = participle.MustBuild[RillTime]( participle.Lexer(rillTimeLexer),