Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
For the following SQL:
select deptno from "scott".dept tablesample bernoulli(50);
We could rewrite it to:
select deptno from "scott".dept where rand() < 0.5;
The sql :
select deptno from "scott".dept tablesample bernoulli(50) REPEATABLE(10);
We could rewrite it to:
select deptno from "scott".dept where rand(10) < 0.5;
This rule only rewrite the tablesample bernoulli,and this rule is like presto/trino's ImplementBernoulliSampleAsFilter rule
Attachments
Issue Links
- is duplicated by
-
CALCITE-5970 Add the RelRule to rewrite the Sample as Filter
- Closed
- links to