sql

sheluchin 2025-06-18T13:33:15.537449Z

Does DuckDB have problems producing qualified maps? I've tried adding :ResultSetMetaDataOptions "1" to my DS but it doesn't seem to make a difference. Is there a way to check at the DB level if the DB is the issue?

seancorfield 2025-06-18T13:40:14.152649Z

https://github.com/duckdb/duckdb-java/blob/main/src/main/java/org/duckdb/DuckDBResultSetMetaData.java#L332 .getTableName() returns "" so you won't get table names on your column keys.

👀 1
seancorfield 2025-06-18T13:40:26.669109Z

Oracle is the same, as I recall.

sheluchin 2025-06-18T13:42:35.889509Z

Clear as day when you know where to look. Is there an idiomatic workaround for this? My guess would be to use rs/as-modified-maps with :qualifier-fn (constantly table-name) or so.

seancorfield 2025-06-18T13:44:45.162639Z

Well, that won't work with JOIN -- on other DBs you'd get the table/column for each joined table, whereas :qualifier-fn applies the same qualifier to all columns.

seancorfield 2025-06-18T13:45:01.919399Z

But with that caveat, yeah, :qualifier-fn gets you part of the way.

sheluchin 2025-06-18T13:55:15.902419Z

Got it. Thank you, @seancorfield.