You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2023/08/12 20:56:00 UTC

[jira] [Commented] (CALCITE-5912) Add an implementation of TABLESAMPLE in Enumerable convention

    [ https://issues.apache.org/jira/browse/CALCITE-5912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17753588#comment-17753588 ] 

Julian Hyde commented on CALCITE-5912:
--------------------------------------

Now that CALCITE-5916 is fixed, you should add an implementation of {{interface SampleFactory}}; and now that CALCITE-5895 is fixed, you should add tests to {{tablesample.iq}}.

> Add an implementation of TABLESAMPLE in Enumerable convention
> -------------------------------------------------------------
>
>                 Key: CALCITE-5912
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5912
>             Project: Calcite
>          Issue Type: New Feature
>            Reporter: LakeShen
>            Priority: Major
>
> In Calcite, the TableSample SQL statement will be converted to Sample RelNode plan tree,for example:
> {code:java}
> select * from emp tablesample bernoulli(10){code}
> The plan is :
> {code:java}
> LogicalProject(EMPNO=[$0], ENAME=[$1], JOB=[$2], MGR=[$3], HIREDATE=[$4], SAL=[$5], COMM=[$6], DEPTNO=[$7], SLACKER=[$8])
>   Sample(mode=[bernoulli], rate=[10.0], repeatableSeed=[-])
>     LogicalTableScan(table=[[CATALOG, SALES, EMP]]) {code}
> Currently in enumerable mode, we don't have EnumerableSample, So we can't add TableSample quidem tests (such as in misc.iq).
> After this jira,we could add the quidem test for TableSample(such as tablesample.iq),although TableSample's results are inconclusive when the 0 < sample rate < 100, but TampeSample(0) is certain result.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)