1

I need to use array_agg function like below.(It`s postgresql)

test=# select t2.c_no, array_agg(t4.contents) from table2 as t2 inner join table4 as t4 on t2.c_no = t4.c_no group by t2.c_no;
 c_no |        array_agg         
------+--------------------------
    2 | {kkac,aa,akkk,kkacd,kka}
   12 | {abc}
   21 | {kk,kkacaaad}
(3 rows)

But, I can`t find array_agg function in Apache Drill documents.

Do I need to make custom function of array_agg? Does the Apache Drill have a plan for array_agg function?

Steven Chu
  • 71
  • 1
  • 7
  • 1
    Check out https://issues.apache.org/jira/browse/DRILL-6963 – h345k34cr Jul 11 '20 at 10:20
  • Thanks you for your comment :) – Steven Chu Jul 14 '20 at 08:53
  • I tried to solve it myself now, but I ran into some problems, so I don't think it's a full answer yet that I would post here. To fix my issues, I created a new question: https://stackoverflow.com/questions/62919727/apache-drill-write-general-purpos-array-agg-udf – h345k34cr Jul 15 '20 at 16:42

0 Answers0