dqkqd commented on code in PR #18254:
URL: https://github.com/apache/datafusion/pull/18254#discussion_r2462214040
##########
datafusion/sqllogictest/test_files/cte.slt:
##########
@@ -122,6 +110,22 @@ physical_plan
08)----------RepartitionExec: partitioning=RoundRobinBatch(4),
input_partitions=1
09)------------WorkTableExec: name=nodes
+# trivial deduplicating recursive CTE works
+query I
+WITH RECURSIVE nodes AS (
+ SELECT 1 as id
+ UNION ALL
Review Comment:
I think this was meant to be `UNION`.
And the original test wasn't generating duplicate results with `UNION ALL`.
Maybe we should use a different query, I could think of some thing like
this,
but I believe there should be a better one.
```sql
WITH RECURSIVE nodes AS (
SELECT id from (VALUES (1), (2)) nodes(id)
UNION
SELECT id + 1 as id
FROM nodes
WHERE id < 4
)
SELECT * FROM nodes;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]