Fix query interval definitions for date add/sub

This commit is contained in:
Tomaž Jerman
2022-09-28 10:10:49 +02:00
parent 2d07357a75
commit 7360b72dbf
4 changed files with 72 additions and 11 deletions
+4 -1
View File
@@ -236,7 +236,10 @@ func (n interval) ToAST() (out *ASTNode) {
return &ASTNode{
Ref: "interval",
Args: ASTNodeSet{
{Symbol: n.unit},
// @todo consider introducing a new concept on the ASTNode to cover
// system defined symbols/keywords. This is a temporary solutions
// to fix reporting interval definitions; it should eventually be reworked
{Value: MakeValueOf("String", n.unit)},
{Value: MakeValueOf("Number", n.value)},
},
}