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
Describe the bug
I am not sure if this is a bug or a feature request. It seems that python loader functions work also with temporary tables in case I first create the table and then copy into it from loader function. However, it does not work if I try to create temp table from loader function.
To Reproduce
BEGIN TRANSACTION;
CREATE TEMP TABLE test_table(a INT) on commit drop;
CREATE OR REPLACE LOADER myloader(c INT) LANGUAGE PYTHON {
_emit.emit( { 'a' : c+1 } )
};
COPY LOADER INTO test_table FROM myloader((select 5));
select * from test_table;
COMMIT;
The above flow works and returns 6
Using this syntax:
sql> CREATE TEMP TABLE TEST1 from LOADER myloader((select 5));
syntax error in: "create temp table test1 from"
However this syntax is allowed for persistent tables:
sql> CREATE TABLE TEST1 from LOADER myloader((select 5));
operation successful
It seems that loader functions can be used to load temporary tables, but this is not supported by the parser.
The text was updated successfully, but these errors were encountered:
It was me, at that time I had a previous version of MonetDB (don't remember exactly which version). Loader functions did not work even with precreated temp tables. Now with the latest version they work if you first create and then copy into so I feel that the functionality exists.
Describe the bug
I am not sure if this is a bug or a feature request. It seems that python loader functions work also with temporary tables in case I first create the table and then copy into it from loader function. However, it does not work if I try to create temp table from loader function.
To Reproduce
BEGIN TRANSACTION;
CREATE TEMP TABLE test_table(a INT) on commit drop;
CREATE OR REPLACE LOADER myloader(c INT) LANGUAGE PYTHON {
_emit.emit( { 'a' : c+1 } )
};
COPY LOADER INTO test_table FROM myloader((select 5));
select * from test_table;
COMMIT;
The above flow works and returns 6
Using this syntax:
sql> CREATE TEMP TABLE TEST1 from LOADER myloader((select 5));
syntax error in: "create temp table test1 from"
However this syntax is allowed for persistent tables:
sql> CREATE TABLE TEST1 from LOADER myloader((select 5));
operation successful
It seems that loader functions can be used to load temporary tables, but this is not supported by the parser.
The text was updated successfully, but these errors were encountered: