Used columns in col_vals_expr()
are extracted lazily
#570
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.
In #505, the extraction of used columns was eager, at the validation step's creation. This forced evaluation of
preconditions
even whenactive
was set to FALSE. To respectactive
and prevent materializing the table until if/when necessary, this PR simply moves the "extract used columns" behavior intointerrogate()
.Consequently, inactive steps revert to the old
col_vals_expr()
behavior of not showing used columns (as what columns are available in the table is is unknown until precondition is triggered)(modified) reprex from #569
For the same reason, uninterrogated agents will not show used columns for
col_vals_expr()
. But interrogated agents will.Active and interrogated
col_vals_expr()
steps will continue to show used columns in the report:get_agent_report(agent_interrogated)