paradedb / paradedb

Postgres for Search and Analytics
https://paradedb.com
GNU Affero General Public License v3.0
6.22k stars 186 forks source link

Auto schema changes columns to lowercase #1408

Closed BigBerny closed 3 months ago

BigBerny commented 4 months ago

What happens?

When creating the foreign table based on parquet files all the columns will be lowercased. This is an issue because previous queries used for PostgreSQL won't work anymore. Actually also DuckDB behaves differently since it will also keep the casing of the column names when loading parquet files.

To Reproduce

-- If auto schema creation enabled, it will convert to all column names to lowercase CREATE FOREIGN TABLE () SERVER OPTIONS (files '');

-- If auto schema creation disabled, it's possible to create mixed case column names manually. These work as expected CREATE FOREIGN TABLE ( "ColumnNameA" int, "ColumnNameB" text ) SERVER SERVER (files '');

-- Now double quotes work SELECT "ColumnNameA" FROM LIMIT 1

OS:

Ubuntu

ParadeDB Version:

v0.8.4

Are you using ParadeDB Docker, Helm, or the extension(s) standalone?

ParadeDB pg_lakehouse Extension

Full Name:

Janis

Affiliation:

Typewise

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

Yes

Did you include the code required to reproduce the issue?

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

pantonis commented 3 months ago

We have this same problem. All of our queries stopped working.

pantonis commented 3 months ago

Thank you for fixing this.