Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,14 @@
case 'count_distinct_approx':
// ok, do nothing
break;
case 'number':
// Additional filters for `number` measures should be propagated to leaf measures
// And only leaf `number` measures should trigger an error
throw new UserError(

Check warning on line 87 in packages/cubejs-schema-compiler/src/adapter/BaseMeasure.ts

View check run for this annotation

Codecov / codecov/patch

packages/cubejs-schema-compiler/src/adapter/BaseMeasure.ts#L87

Added line #L87 was not covered by tests
`Additional filters for measure ${sourceMeasure} type ${source.type} are supported only in Tesseract`
);
default:
// Can not add filters to string, time, boolean, number
// Can not add filters to string, time, boolean
// Aggregation is already included in SQL, it's hard to patch that
throw new UserError(
`Unsupported additional filters for measure ${sourceMeasure} type ${source.type}`
Expand Down
4 changes: 3 additions & 1 deletion rust/cubesql/cubesql/src/transport/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@
| "max"
| "count"
| "count_distinct"
| "count_distinct_approx" => true,
| "count_distinct_approx"

Check warning on line 96 in rust/cubesql/cubesql/src/transport/ext.rs

View check run for this annotation

Codecov / codecov/patch

rust/cubesql/cubesql/src/transport/ext.rs#L96

Added line #L96 was not covered by tests
// For number measures new filter should be propagated to leaf measures
| "number" => true,
_ => false,
}
}
Expand Down
Loading