Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SQL] INSERT INTO BUCKET FROM (subquery) silently fails #1961

Open
gramian opened this issue Feb 11, 2025 · 0 comments
Open

[SQL] INSERT INTO BUCKET FROM (subquery) silently fails #1961

gramian opened this issue Feb 11, 2025 · 0 comments

Comments

@gramian
Copy link
Collaborator

gramian commented Feb 11, 2025

ArcadeDB Version 25.1.1

Inserting into a bucket via a sub-query reports inserted records but they don't exists, ie:

CREATE DOCUMENT TYPE src;
INSERT INTO src SET name = 'Hi';

CREATE DOCUMENT TYPE doc BUCKET doc;
INSERT INTO BUCKET:doc FROM (SELECT name FROM src); -- This fails silently

SELECT FROM BUCKET:doc; -- This returns 0 records

This (without BUCKET) works as expected:

CREATE DOCUMENT TYPE src;
INSERT INTO src SET name = 'Hi';

CREATE DOCUMENT TYPE doc BUCKET doc;
INSERT INTO doc FROM (SELECT name FROM src);

SELECT FROM doc; -- This returns 1 record

This reports: Error on command execution (PostCommandHandler): Cannot update a record in a custom bucket:

CREATE DOCUMENT TYPE doc BUCKET doc, src;
INSERT INTO BUCKET:src SET name = 'Hi';

INSERT INTO BUCKET:doc FROM (SELECT name FROM BUCKET:src);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant