Skip to content

Conversation

@epsniff
Copy link
Collaborator

@epsniff epsniff commented Jun 1, 2019

We may have an issue with unary support with datemath. This PR is just to investigate that issue and to possibly fix it if we find an issue. For example FILTER NOT last_event < "now-1d"

to run test:

go test --run TestDateMath/FILTER_NOT -v 

@epsniff
Copy link
Collaborator Author

epsniff commented Jun 1, 2019

@araddon I added indentation to the printing of the AST:

epsniff@hms-victory:...n/qlbridge/vm$ go test --run TestDateMath/FILTER_NOT -v 
=== RUN   TestDateMath
=== RUN   TestDateMath/FILTER_NOT_last_event_<_"now-1d"
node *expr.UnaryNode  NOT (last_event < "now-1d")  negated:false
  node *expr.BinaryNode  (last_event < "now-1d")  negated:true
    node *expr.IdentityNode  last_event  negated:true
node *expr.UnaryNode  NOT (last_event < "now-1d")  negated:false
  node *expr.BinaryNode  (last_event < "now-1d")  negated:true
    node *expr.IdentityNode  last_event  negated:true
filter      :FILTER NOT last_event < "now-1d"
t1:         :2019-05-31 17:49:28.480704699 -0700 PDT m=+0.002168089
boundary    :2019-06-01 17:49:28.480704699 -0700 PDT m=+86400.002168047
diff        :23h59m59.999999958s
timeStrings :[now-1d]
node *expr.IncludeNode  INCLUDE not_valid_lookup  negated:false
node *expr.BinaryNode  last_event > "now-3x"  negated:false
  node *expr.IdentityNode  last_event  negated:false
node *expr.BinaryNode  last_event == "now-3d"  negated:false
  node *expr.IdentityNode  last_event  negated:false

But Im not sure why it's printing off two ASTs yet....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants