Implement data.table-like j argument, without evalutation #37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Expressions are simplified to be in terms of on-disk columns and unknown symbols, but are not handled beyond that stage. Columns can be selected, rearranged, renamed and duplicated.
Example of functionality:
The main idea of this PR is the introduction of the
colexps
field in the table proxy object. This object is used to track the current column-state of the table. It is a list of expressions, with symbols of either on-disk columns or extra in-memory data.To go with the
colexps
field, I added atable_proxy_transform
method (terminology roughly based on dplyr). This method is used to updatecolexps
by substituting the exsting column expressions into the new ones. This method is extremely flexible (probably to a fault) and agnostic to the interface implementation.Note: A lot of the code in
table_proxy_methods.R
is just hacked together so that the tables print nicely. Before working on this further I think we should consider unifying or refactoringtable_proxy_read_full
andtable_proxy_read_range
to avoid code duplication. I also wonder if the range method is even necessary; reading a range of a proxy table is the same as reading a "full" proxy table with a different slice_map.