feat(core): introduce the hidden column #863
Merged
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.
Description
This PR introduces a new column property,
is_hidden
. A hidden column means this column is defined in the MDL but it can't be used in the query.The main purpose of a hidden column is to infer the remote source column. Sometimes, we want to apply something on a remote column like, casting, lowercase, or trim. we may write the MDL like
However, according to the rule of #844, we can get a remote column from a casting expression. So
date_in_int_col
won't be registered as a source column, the column expression isn't valid.In this case, we should add another column for the column inferring but we don't want to expose this column. So we can invoke the
is_hidden
propertyNow, we can infer the remote column is an int column called
date_in_int_col
. We can use it in the expression of another column.