我们如何在Apache Drill上执行递归查询

时间:2018-07-27 22:48:22

标签: sql apache-drill

在apache演练中,我们如何使用带有子句的CTE执行递归查询?

1 个答案:

答案 0 :(得分:3)

Apache Drill不支持递归查询。 Usage Notes部分:

  

Drill can only reference a table defined by a WITH clause subquery in the scope of the SELECT query that the WITH clause begins. For example, you can reference such a table in the FROM clause of a subquery in the SELECT list, WHERE clause, or HAVING clause. You cannot use a WITH clause in a subquery and reference its table in the FROM clause of the main query or another subquery.

尝试重写查询而不进行递归。开发人员mailing list上也进行了讨论,可能会有有用的建议或解决方法。