[
https://issues.apache.org/jira/browse/CALCITE-5971?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
LakeShen updated CALCITE-5971:
------------------------------
Description:
For the following SQL:
{code:java}
select deptno from "scott".dept tablesample bernoulli(50); {code}
We could rewrite it to:
{code:java}
select deptno from "scott".dept where rand() < 0.5; {code}
The sql :
{code:java}
select deptno from "scott".dept tablesample bernoulli(50) REPEATABLE(10);
{code}
We could rewrite it to:
{code:java}
select deptno from "scott".dept where rand(10) < 0.5; {code}
> Add the RelRule to rewrite the Sample as Filter
> -----------------------------------------------
>
> Key: CALCITE-5971
> URL: https://issues.apache.org/jira/browse/CALCITE-5971
> Project: Calcite
> Issue Type: New Feature
> Components: core
> Reporter: LakeShen
> Priority: Major
>
> For the following SQL:
> {code:java}
> select deptno from "scott".dept tablesample bernoulli(50); {code}
> We could rewrite it to:
> {code:java}
> select deptno from "scott".dept where rand() < 0.5; {code}
> The sql :
> {code:java}
> select deptno from "scott".dept tablesample bernoulli(50) REPEATABLE(10);
> {code}
> We could rewrite it to:
> {code:java}
> select deptno from "scott".dept where rand(10) < 0.5; {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)