-
Notifications
You must be signed in to change notification settings - Fork 20
Support Dynamic expression evaluation #242
Comments
@alex-dukhno can you assign this issue to me? Thanks. |
Is this issue primarily meant for update query and then extend the implementation to other queries later? Or generalized implementation now? |
I think |
I've looked through variants of |
@AndrewBregger uh, I notice that |
The current limitation of ExpressionEvaluation is that it doesn't know anything about the rest of the query (i.e. the tables referenced). I am thinking that the source tables information can be given to ExpressionEvaluation, the job of this struct would be to evaluate as much of the expression as it can. Using the table information to resolve column accesses to column indices. However, when evaluating the resulting expression during query evaluation a different mechanism will handle it. I have some ideas for how the query can be evaluated which we should discuss at some point. |
my idea was that whenever |
I knew what you meant. I was explaining what I was going to implement and what needed to be added to the current structure to allow for this implementation. Whenever it sees an identifier it will resolve it to a column in a table. If it can't do that then it will fail. |
I think it is better to introduce another struct to do so it could be either a field of |
Successful updating with dynamic expressions! Depending on what you think, it could be good enough for this pull request. It is not the final implementation for handling expressions. For the implementation, you can look at my expressions branch.
|
I am in favour of a PR.
It's always good to see some progress 😄 |
The current issue is that it isn't doing type checking on the columns. I'll do that this evening and then make a pull request. |
If it is complex or takes longer than you expect, create PR and left a comment about that, I think issue could be addressed in the following PRs |
Right now
ExpressionEvaluation
supports only static values evaluation e.g.4 + 2
will be evaluated into6
However, the case with column names is not covered.
E.g.
Also, it requires to fold static expression as much as possible, e.g.
should become equivalent to
The text was updated successfully, but these errors were encountered: