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 2016/10/17 23:44:58 UTC
[jira] [Commented] (CALCITE-1450) support a UDTF replicate_rows
[ https://issues.apache.org/jira/browse/CALCITE-1450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15583861#comment-15583861 ]
Julian Hyde commented on CALCITE-1450:
--------------------------------------
It would be useful if {{replicate_rows}} were a relational operator (i.e. a subclass of {{RelNode}}), not a UDTF. Then we could write rules to push {{Filter}} and {{Project}} operators through it, and we wouldn't necessarily have to implement it in Java.
> support a UDTF replicate_rows
> -----------------------------
>
> Key: CALCITE-1450
> URL: https://issues.apache.org/jira/browse/CALCITE-1450
> Project: Calcite
> Issue Type: Sub-task
> Reporter: Pengcheng Xiong
> Assignee: Julian Hyde
>
> Add a user-defined table function that has a count column N, and a number of other columns, and for each row, produces N copies of that row.
> The purpose of this table function is to implement {{INTERSECT ALL}} and {{EXCEPT ALL}}. Observe that if have a table 'five' with 5 rows with the value 'x', and a table 'three' with 3 rows with the value 'x', then {{five INTERSECT ALL three}} will need to emit {{min(5, 3))}} rows, and {{five EXCEPT ALL three}} will emit {{5 - 3}} rows.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)