[jOOQ/jOOQ#16874] CREATE TABLE and other DDL statements don't qualify
tables in BigQuery
This commit is contained in:
parent
58b3d06b48
commit
b53e922e9e
@ -44,6 +44,7 @@ import static java.util.stream.Collectors.joining;
|
||||
import static org.jooq.Clause.FIELD;
|
||||
import static org.jooq.Clause.FIELD_REFERENCE;
|
||||
// ...
|
||||
// ...
|
||||
import static org.jooq.conf.RenderImplicitJoinType.DEFAULT;
|
||||
import static org.jooq.conf.RenderImplicitJoinType.SCALAR_SUBQUERY;
|
||||
import static org.jooq.impl.DSL.select;
|
||||
@ -56,6 +57,7 @@ import static org.jooq.impl.Tools.ExtendedDataKey.DATA_RENDER_TABLE;
|
||||
import static org.jooq.impl.UpdateQueryImpl.NO_SUPPORT_UPDATE_JOIN;
|
||||
import static org.jooq.tools.StringUtils.defaultIfNull;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.jooq.Binding;
|
||||
@ -68,8 +70,10 @@ import org.jooq.DataType;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.GeneratorStatementType;
|
||||
import org.jooq.Name;
|
||||
// ...
|
||||
import org.jooq.Record;
|
||||
import org.jooq.RowId;
|
||||
import org.jooq.SQLDialect;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.Update;
|
||||
@ -94,9 +98,13 @@ implements
|
||||
UEmpty
|
||||
{
|
||||
|
||||
private static final Clause[] CLAUSES = { FIELD, FIELD_REFERENCE };
|
||||
private static final Clause[] CLAUSES = { FIELD, FIELD_REFERENCE };
|
||||
|
||||
private final Table<R> table;
|
||||
|
||||
|
||||
|
||||
|
||||
private final Table<R> table;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
TableFieldImpl(Name name, DataType<T> type, Comment comment) {
|
||||
@ -253,6 +261,10 @@ implements
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
else
|
||||
c.visit(table).sql('.');
|
||||
}
|
||||
|
||||
@ -44,8 +44,6 @@ import static org.jooq.Clause.TABLE_ALIAS;
|
||||
import static org.jooq.Clause.TABLE_REFERENCE;
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.DUCKDB;
|
||||
import static org.jooq.SQLDialect.FIREBIRD;
|
||||
import static org.jooq.SQLDialect.HSQLDB;
|
||||
// ...
|
||||
@ -61,7 +59,6 @@ import static org.jooq.impl.QueryPartListView.wrap;
|
||||
import static org.jooq.impl.SchemaImpl.DEFAULT_SCHEMA;
|
||||
import static org.jooq.impl.Tools.EMPTY_OBJECT;
|
||||
import static org.jooq.impl.Tools.getMappedTable;
|
||||
import static org.jooq.impl.Tools.unwrap;
|
||||
import static org.jooq.impl.Tools.BooleanDataKey.DATA_RENDER_IMPLICIT_JOIN;
|
||||
import static org.jooq.tools.StringUtils.defaultIfNull;
|
||||
|
||||
@ -74,13 +71,13 @@ import org.jooq.Clause;
|
||||
import org.jooq.Comment;
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Context;
|
||||
import org.jooq.DDLQuery;
|
||||
import org.jooq.DataType;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.ForeignKey;
|
||||
import org.jooq.InverseForeignKey;
|
||||
import org.jooq.JoinType;
|
||||
import org.jooq.Name;
|
||||
// ...
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Row;
|
||||
import org.jooq.SQLDialect;
|
||||
@ -120,10 +117,6 @@ implements
|
||||
private static final Set<SQLDialect> NO_SUPPORT_QUALIFIED_TVF_CALLS = SQLDialect.supportedBy(HSQLDB, POSTGRES, YUGABYTEDB);
|
||||
private static final Set<SQLDialect> REQUIRES_TVF_TABLE_CONSTRUCTOR = SQLDialect.supportedBy(HSQLDB);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
final FieldsImpl<R> fields;
|
||||
final Alias<Table<R>> alias;
|
||||
final Condition where;
|
||||
@ -487,9 +480,6 @@ implements
|
||||
|
||||
if (!noSchemaMapping && ctx.qualifySchema() && (ctx.declareTables()
|
||||
|| (!NO_SUPPORT_QUALIFIED_TVF_CALLS.contains(ctx.dialect()) || parameters == null)
|
||||
|
||||
|
||||
|
||||
)) {
|
||||
QualifiedImpl.acceptMappedSchemaPrefix(ctx, getSchema());
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user