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

Could not convert DuckDB type: UNKNOWN to Postgres type #503

Closed
2 tasks done
Leo-XM-Zeng opened this issue Dec 19, 2024 · 3 comments
Closed
2 tasks done

Could not convert DuckDB type: UNKNOWN to Postgres type #503

Leo-XM-Zeng opened this issue Dec 19, 2024 · 3 comments

Comments

@Leo-XM-Zeng
Copy link
Contributor

What happens?

[postgres@halo-centos8 pg_duckdb]$ psql test
psql (16.6)
Type "help" for help.

test=# create table t1(a int);
CREATE TABLE
test=# create table t2(b int);
CREATE TABLE
test=# INSERT INTO t1 SELECT generate_series(1, 10000);
INSERT 0 10000
test=# INSERT INTO t2 SELECT generate_series(1, 10000);
INSERT 0 10000
test=# set duckdb.force_execution = on;
SET
test=# \timing
Timing is on.
test=# PREPARE q1(int) AS
test-# SELECT count(*) FROM t1, t2 WHERE t1.a = t2.b or t1.a = t2.b + $1;
PREPARE
Time: 0.504 ms
test=# execute q1(100);
WARNING:  (PGDuckDB/GetPostgresDuckDBType) Could not convert DuckDB type: UNKNOWN to Postgres type
WARNING:  (PGDuckDB/CreatePlan) Cache lookup failed for type 0
 count 
-------
 19900
(1 row)

Time: 8883.252 ms (00:08.883)

To Reproduce

create table t1(a int);
create table t2(b int);
INSERT INTO t1 SELECT generate_series(1, 10000);
INSERT INTO t2 SELECT generate_series(1, 10000);
set duckdb.force_execution = on;
\timing
PREPARE q1(int) AS
SELECT count(*) FROM t1, t2 WHERE t1.a = t2.b or t1.a = t2.b + $1;
execute q1(100);

OS:

centos8

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

main

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

16.6

Hardware:

No response

Full Name:

Man Zeng

Affiliation:

Halo

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

I have tested with a source build

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

Yes

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 Dec 19, 2024

Closing this, since it's a duplicate of #480

@JelteF JelteF closed this as completed Dec 19, 2024
@Leo-XM-Zeng
Copy link
Contributor Author

Closing this, since it's a duplicate of #480

Okay, sorry, I didn't notice there was already a similar problem~

@JelteF
Copy link
Collaborator

JelteF commented Dec 19, 2024

No worries, thanks for the report. Please keep them coming. I'm just trying to keep the issue list free of duplicates.

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

2 participants