You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The interfaces of `io.deephaven.api.expression.Filter`, `io.deephaven.api.expression.Expression`, and `io.deephaven.api.value.Value` were originally developed and influenced based on the structure of the gRPC messages and engine capabilities; and they were explicitly called out due to lack of completeness with respect to these constructions in #829, #830, and #831.
Upon delving into SQL work in #3473, it became clear that it was time to update these interfaces with the more expressive structures that could better preserve the semantics and intentions of the SQL expressions. The alternative involves throwing up our hands and using `io.deephaven.api.RawString` everywhere instead.
For example, it was possible before to represent the filters of `Foo > Bar` and `Foo > 42`, but it was not possible to represent `Foo > Bar + 42` (again, without dropping down into RawString); and equivalently, an Expression could be `Bar`, or `42`, but not `Bar + 42` (essentially, limiting what could be represented in the case of view or update Selectable).
This PR greatly expands the expressiveness of these interfaces while also cleaning up the hierarchy. The main highlights:
* `Filter` is now an `Expression`
* `FilterCondition` renamed `FilterComparison`
* `Value` is gone; in its place, a more specific `Literal` structure
* Usages of `Value` replaced with the more generic `Expression` type (for example, LHS / RHS of `FilterComparison` are now Expressions instead of Values)
* `Function` / `Method` created to represent function / method calls without needing to drop into `RawString` (for example, we might want to have `io.deephaven.sql.Functions#sum_sql` as something that can be properly referenced).
* Moved `QueryConstants` to new project `query-constants`
* Added filter README
* Added `FilterPattern` / `FilterIn` filters
* Expanded `Literal` to all primitives
* Renamed `PatternFiltern` and made package private
This PR does not aim to update the gRPC layer at this time, mainly do to time considerations and that #3473 is limited to execution completely within the server environment. That said, we would likely benefit from updating the gRPC layer to be more expressive in the ways proposed here.
There's also potential in the future for the engine layer to benefit from the additional structuring here; potentially constructing more advanced filters and expressions without needing to compile strings.
io.deephaven.api.expression.Expression
could use more structuring. Mathematical operators, function calls, etc.The text was updated successfully, but these errors were encountered: