Add MV_FILTER_REGEX and MV_FILTER_PREFIX SQL functions#18281
Add MV_FILTER_REGEX and MV_FILTER_PREFIX SQL functions#18281jtuglu1 merged 11 commits intoapache:masterfrom
Conversation
|
@clintropolis I may still cleanup the |
cd4b87d to
2571eb2
Compare
clintropolis
left a comment
There was a problem hiding this comment.
overall lgtm, nice to have these other DimensionSpec migrated over to virtual columns. Someday I would like do deprecate DimensionSpec other than DefaultDimensionSpec and do all of the others as virtual columns, so this aligns well with that.
The virtual columns are missing an implementation of getIndexSupplier, so using them for filtering directly is probably sub-optimal, however that is also probably ok because i think the primary use of these functions are so you can tidy up an MVD and not see seemingly unrelated values when using a filter on the column itself due to how filters behave on mvds (if any value in the row matches the whole row matches, and when using grouping the implicit unnest results in the other non-matching row values appearing in results). So like as long as people are just using the MV_ functions in the select clause and just using the column itself and the regular filter in the where clause it shouldn't be a big deal.
Fixes #12911.
Description
MV_FILTER_REGEXandMV_FILTER_PREFIXSQL functions.VirtualColumnimplementations:RegexFilteredVirtualColumnandPrefixFilteredVirtualColumn.RegexpLikeExprMacroto support dynamic pattern literals (similar to howRegexpReplaceExprMacrodoes).Examples
For following datasource:
Release note
Add MV_FILTER_REGEX and MV_FILTER_PREFIX SQL functions
Key changed/added classes in this PR
MyFooOurBarTheirBazThis PR has: