You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @mustafasrepo could you give me the actual table creation SQL for this issue?
Sure,
CREATE EXTERNAL TABLE multiple_ordered_table (
a0 INTEGER,
a INTEGER,
b INTEGER,
c INTEGER,
d INTEGER
)
STORED AS CSV
WITH HEADER ROW
WITH ORDER (a ASC, b ASC)
WITH ORDER (c ASC)
LOCATION '../core/tests/data/window_2.csv';
you can create the table in the queries with above snippet
As @Lordworms points out, maybe we can try to implement this feature in some way that is general and not special cased in the optimzer -- aka #9289
This would look like
Making ARRAY_AGG an AggregateUDF (which probably would mean making a datafusion-aggregates crate
Adding an API to do the rewrite
This would certainly take more work and thus more time than just implementing a special case for the BuiltInAggregateFunction, so I don't think it is necessary
However, if we think this is a reasonbale approach I can file some tickets with the basic ideas sketeched out (I didn't want to sketch out too many things at once and we already have a bunch of work related to pulling out scalar UDFs)
Yes, I truely want to add some general approach instead of writing some "if else", but I agree that currently we have more ticket than that, I could do this one later and do some current-ticket...
Activity
Lordworms commentedon Feb 18, 2024
I can do this one
Lordworms commentedon Feb 19, 2024
Hello @mustafasrepo could you give me the actual table creation SQL for this issue?
mustafasrepo commentedon Feb 19, 2024
Sure,
you can create the table in the queries with above snippet
Lordworms commentedon Feb 20, 2024
take
fix: issue apache#9213 substitute ArrayAgg to NthValue to optimize qu…
alamb commentedon Feb 21, 2024
As @Lordworms points out, maybe we can try to implement this feature in some way that is general and not special cased in the optimzer -- aka #9289
This would look like
ARRAY_AGGanAggregateUDF(which probably would mean making adatafusion-aggregatescrateThis would certainly take more work and thus more time than just implementing a special case for the BuiltInAggregateFunction, so I don't think it is necessary
However, if we think this is a reasonbale approach I can file some tickets with the basic ideas sketeched out (I didn't want to sketch out too many things at once and we already have a bunch of work related to pulling out scalar UDFs)
Lordworms commentedon Feb 21, 2024
Yes, I truely want to add some general approach instead of writing some "if else", but I agree that currently we have more ticket than that, I could do this one later and do some current-ticket...
fix: issue #9213 substitute ArrayAgg to NthValue to optimize query pl…