Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

figuring out if we have an issue with unary datemath #229

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

1 participant