generated from duckdb/extension-template
-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Hi Rusty,
the following table function with a table input throws an exception "airport_dynamic_table_function: write record batch Destination already closed". The table function just echoes the input by binding every input row to sql server parameters , executing the provided statement and returning the result.
`
with params as
(
select txt:'hello',num:12
union all
select txt:'world',num:15
),
result as
(
select
*
from test.dbo.execute_apply
(
'select cast(@num as int) as num,cast(@txt as varchar(max)) as txt',
(select txt,num from params)
)
)
select * from result
--order by all
`
when debugging i see calls to
- AirportTakeFlightInOut with one recordbatch containing one 1 row
- AirportTakeFlightInOutFinalize where global_state.writer->DoneWriting() closes the input recordbatch stream in my side which then sends the final finished recordbatch.
- another AirportTakeFlightInOut with one recordbatch containing one 1 row (the other row of the parameters union). This now fails because the writer is closed from previous DoneWriting call
KR
Christoph
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels