Skip to content

Commit

Permalink
Adding mapping for old rill-<> format
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaHegde committed Dec 30, 2024
1 parent a947e7f commit 6d51ab9
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions runtime/pkg/rilltime/rilltime.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,23 @@ var (
})
daxNotations = map[string]string{
// Mapping for our old rill-<DAX> 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),
Expand Down

0 comments on commit 6d51ab9

Please sign in to comment.