-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat(tesseract): multi-stage grain directive #10957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b5a556c
e55f699
e9a453d
79dcee2
17eb981
0018d28
272eb66
7ac6fdd
56909bf
65b6c47
bfbcf44
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,7 @@ export const transpiledFieldsPatterns: Array<RegExp> = [ | |
| /^measures\.[_a-zA-Z][_a-zA-Z0-9]*\.(timeShift|time_shift)\.[0-9]+\.(timeDimension|time_dimension)$/, | ||
| /^measures\.[_a-zA-Z][_a-zA-Z0-9]*\.(reduceBy|reduce_by|groupBy|group_by|addGroupBy|add_group_by)$/, | ||
| /^(measures|dimensions)\.[_a-zA-Z][_a-zA-Z0-9]*\.filter\.(exclude|keepOnly|keep_only)$/, | ||
| /^measures\.[_a-zA-Z][_a-zA-Z0-9]*\.grain\.(exclude|keepOnly|keep_only|include)$/, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor: The transpiler pattern supports However, I notice the |
||
| /^(measures|dimensions)\.[_a-zA-Z][_a-zA-Z0-9]*\.case\.switch$/, | ||
| /^dimensions\.[_a-zA-Z][_a-zA-Z0-9]*\.(reduceBy|reduce_by|groupBy|group_by|addGroupBy|add_group_by|key)$/, | ||
| /^(preAggregations|pre_aggregations)\.[_a-zA-Z][_a-zA-Z0-9]*\.indexes\.[_a-zA-Z][_a-zA-Z0-9]*\.columns$/, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Joi
MultiStageGrainvalidator uses.nand('exclude', 'keepOnly')but doesn't enforce that at least one of the three fields (exclude,keepOnly,include) is present. An emptygrain: {}would pass validation and silently become a no-opMultiStageGrain::default()on the Rust side.This is consistent with how
MultiStageFilterworks (it also allows an empty object), so it may be intentional. But unlikefilter:(where an empty object has a meaningful "no filter overrides" reading), an emptygrain: {}on a multi-stage measure is almost certainly a user mistake. Consider adding.or('exclude', 'keepOnly', 'include')to catch this early: