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

start of work to match cql2 against json #55

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

start of work to match cql2 against json #55

wants to merge 12 commits into from

Conversation

bitner
Copy link
Contributor

@bitner bitner commented Dec 12, 2024

WORK IN PROGRESS
TODO:

  • Arithmetic Operators
  • Comparison Operators for Number
  • Comparison Operators for Boolean
  • Comparison Operators for Text
  • Spatial Operators
  • Temporal Operators
  • Testing Framework for Reduce
  • Implement Array Operators
  • Implement Like
  • Implement In
  • Implement Is Null
  • Implement Not
  • Implement Between
  • Implement Cast from BBox to geos geometry
  • Implement basic comparison ops for singular timestamps / dates
  • More tests!

@bitner
Copy link
Contributor Author

bitner commented Dec 12, 2024

So, trying to set this up so that the reduce function can actually be used for any CQL2 expression to collapse things that don't need to go through to the base data. So say you had a CQL2 query like foo = 2 +7, you could use reduce to convert that to foo = 9 . To do that, I'll need to make the json input an option, if it can look up a property in the json, it will replace it with the value in that json. The matches function just looks to see if running reduce has boiled the entire expression down into an Expr::Bool and if so returns that value, if it couldn't reduce it all the way it returns an error.

Cargo.toml Outdated Show resolved Hide resolved
Copy link
Member

@kylebarron kylebarron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really know CQL so I didn't look too closely at the body of reduce (yet)

src/expr.rs Outdated Show resolved Hide resolved
src/expr.rs Outdated Show resolved Hide resolved
cli/src/lib.rs Outdated Show resolved Hide resolved
src/expr.rs Outdated Show resolved Hide resolved
src/expr.rs Outdated Show resolved Hide resolved
src/expr.rs Outdated Show resolved Hide resolved
src/expr.rs Outdated Show resolved Hide resolved
src/expr.rs Outdated Show resolved Hide resolved
src/expr.rs Outdated Show resolved Hide resolved
src/expr.rs Outdated Show resolved Hide resolved
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.

3 participants