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

Incorrect result from DuckDB execution #556

Open
2 tasks done
dpxcc opened this issue Jan 25, 2025 · 1 comment
Open
2 tasks done

Incorrect result from DuckDB execution #556

dpxcc opened this issue Jan 25, 2025 · 1 comment
Labels
bug Something isn't working incorrect result Bugs that return incorrect data

Comments

@dpxcc
Copy link
Contributor

dpxcc commented Jan 25, 2025

What happens?

Turning on duckdb.force_execution produces incorrect result
Please see the repro below

To Reproduce

postgres=# CREATE TABLE s (a text[]);
CREATE TABLE
postgres=# INSERT INTO s VALUES (ARRAY['abc', 'def', 'ghi']);
INSERT 0 1
postgres=# CREATE TABLE t AS TABLE s;
SELECT 1
postgres=# SELECT * FROM t;
       a       
---------------
 {abc,def,ghi}
(1 row)

postgres=# SET duckdb.force_execution TO true;
SET
postgres=# SELECT * FROM t;
  a   
------
 \x01
(1 row)

OS:

Linux

pg_duckdb Version (if built from source use commit hash):

0.2.0

Postgres Version (if built from source use commit hash):

17.2

Hardware:

No response

Full Name:

Cheng Chen

Affiliation:

Mooncake Labs

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a stable release

Did you include all relevant data sets for reproducing the issue?

Not applicable - the reproduction does not require a data set

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Linux distribution) to reproduce the issue?

  • Yes, I have
@JelteF
Copy link
Collaborator

JelteF commented Jan 28, 2025

Hmm. Strange... Somehow that CREATE TABLE AS is significant, since this incorrect output does not occur when querying the s table.

Copy pastable reproduction script:

CREATE TABLE s (a text[]);
INSERT INTO s VALUES (ARRAY['abc', 'def', 'ghi']);
CREATE TABLE t AS TABLE s;
SELECT * FROM s;
SELECT * FROM t;
SET duckdb.force_execution TO true;
SELECT * FROM s;
SELECT * FROM t;

@JelteF JelteF added bug Something isn't working incorrect result Bugs that return incorrect data labels Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working incorrect result Bugs that return incorrect data
Projects
None yet
Development

No branches or pull requests

2 participants