[jOOQ/jOOQ#17251] Cross schema references still don't work:

https://github.com/duckdb/duckdb/issues/13981
This commit is contained in:
Lukas Eder 2024-09-17 12:35:56 +02:00
parent 54a336685d
commit da262ac04b
2 changed files with 6 additions and 3 deletions

View File

@ -38,6 +38,7 @@
package org.jooq.meta.duckdb;
import static org.jooq.impl.DSL.name;
import static org.jooq.impl.DSL.unquotedName;
import static org.jooq.meta.duckdb.system.main.Tables.DUCKDB_COLUMNS;
import java.sql.SQLException;
@ -48,6 +49,7 @@ import java.util.Random;
import org.jooq.Field;
import org.jooq.Name;
import org.jooq.impl.DSL;
import org.jooq.impl.DefaultDataType;
import org.jooq.impl.ParserException;
import org.jooq.impl.QOM;
@ -76,11 +78,12 @@ public class DuckDBUDTDefinition extends AbstractUDTDefinition {
// A current limitation of DuckDB 0.8.1 requires a workaround where we create
// a dummy table containing a reference to the UDT in order to reverse engineer
// its structure, see https://github.com/duckdb/duckdb/discussions/8832
Name name = name("dummy_" + Math.abs(new Random().nextInt()));
// [#17251] Cross schema references still don't work: https://github.com/duckdb/duckdb/issues/13981
Name name = unquotedName(getSchema().getName(), "dummy_" + Math.abs(new Random().nextInt()));
try {
create().createTable(name)
.column("dummy", new DefaultDataType<>(null, Object.class, getName()))
.column("dummy", new DefaultDataType<>(null, Object.class, unquotedName(getSchema().getName(), getName()).toString()))
.execute();
String struct =

View File

@ -25,7 +25,7 @@
<!-- These in-memory DBs are used by jOOQ-meta-extensions and a variety of integration tests -->
<h2.version>2.3.232</h2.version>
<sqlite.version>3.46.1.0</sqlite.version>
<duckdb.version>1.0.0</duckdb.version>
<duckdb.version>1.1.0</duckdb.version>
<derby.version>10.14.2.0</derby.version>
<hsqldb.version>2.7.2</hsqldb.version>