diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/create.ztable.with.generated.as/client.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/create.ztable.with.generated.as/client.rpt index 52b32d6449..a2dbaa08c3 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/create.ztable.with.generated.as/client.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/create.ztable.with.generated.as/client.rpt @@ -66,7 +66,7 @@ write zilla:data.ext ${pgsql:dataEx() .query() .build() .build()} -write "CREATE MATERIALIZED VIEW IF NOT EXISTS cities_view" +write "CREATE MATERIALIZED VIEW IF NOT EXISTS zb_catalog.cities_view" " AS SELECT id, name, description," " COALESCE(owner_id, owner_id_header::varchar) as owner_id," " COALESCE(created_at, created_at_timestamp::timestamp) as created_at" @@ -142,7 +142,7 @@ write zilla:data.ext ${pgsql:dataEx() .query() .build() .build()} -write "CREATE SINK zb_catalog.cities_view_sink INTO cities FROM cities_view;" +write "CREATE SINK zb_catalog.cities_view_sink INTO cities FROM zb_catalog.cities_view;" [0x00] write flush diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/create.ztable.with.generated.as/server.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/create.ztable.with.generated.as/server.rpt index bbcf29657a..e25ddc9255 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/create.ztable.with.generated.as/server.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/create.ztable.with.generated.as/server.rpt @@ -69,7 +69,7 @@ read zilla:data.ext ${pgsql:dataEx() .query() .build() .build()} -read "CREATE MATERIALIZED VIEW IF NOT EXISTS cities_view" +read "CREATE MATERIALIZED VIEW IF NOT EXISTS zb_catalog.cities_view" " AS SELECT id, name, description," " COALESCE(owner_id, owner_id_header::varchar) as owner_id," " COALESCE(created_at, created_at_timestamp::timestamp) as created_at" @@ -142,7 +142,7 @@ read zilla:data.ext ${pgsql:dataEx() .query() .build() .build()} -read "CREATE SINK zb_catalog.cities_view_sink INTO cities FROM cities_view;" +read "CREATE SINK zb_catalog.cities_view_sink INTO cities FROM zb_catalog.cities_view;" [0x00] write advise zilla:flush ${pgsql:flushEx() diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/create.ztable.with.primary.key/client.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/create.ztable.with.primary.key/client.rpt index 4943ea8eb9..9ef7ea5680 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/create.ztable.with.primary.key/client.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/create.ztable.with.primary.key/client.rpt @@ -64,7 +64,7 @@ write zilla:data.ext ${pgsql:dataEx() .query() .build() .build()} -write "CREATE MATERIALIZED VIEW IF NOT EXISTS cities_view AS SELECT * FROM cities_source;" +write "CREATE MATERIALIZED VIEW IF NOT EXISTS zb_catalog.cities_view AS SELECT * FROM cities_source;" [0x00] write flush @@ -134,7 +134,7 @@ write zilla:data.ext ${pgsql:dataEx() .query() .build() .build()} -write "CREATE SINK zb_catalog.cities_view_sink INTO cities FROM cities_view;" +write "CREATE SINK zb_catalog.cities_view_sink INTO cities FROM zb_catalog.cities_view;" [0x00] write flush diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/create.ztable.with.primary.key/server.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/create.ztable.with.primary.key/server.rpt index cff56e6277..450dc08d43 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/create.ztable.with.primary.key/server.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/create.ztable.with.primary.key/server.rpt @@ -67,7 +67,7 @@ read zilla:data.ext ${pgsql:dataEx() .query() .build() .build()} -read "CREATE MATERIALIZED VIEW IF NOT EXISTS cities_view AS SELECT * FROM cities_source;" +read "CREATE MATERIALIZED VIEW IF NOT EXISTS zb_catalog.cities_view AS SELECT * FROM cities_source;" [0x00] write advise zilla:flush ${pgsql:flushEx() @@ -134,7 +134,7 @@ read zilla:data.ext ${pgsql:dataEx() .query() .build() .build()} -read "CREATE SINK zb_catalog.cities_view_sink INTO cities FROM cities_view;" +read "CREATE SINK zb_catalog.cities_view_sink INTO cities FROM zb_catalog.cities_view;" [0x00] write advise zilla:flush ${pgsql:flushEx() diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/drop.ztable/client.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/drop.ztable/client.rpt index 081bbf5bc7..56e5216100 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/drop.ztable/client.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/drop.ztable/client.rpt @@ -124,7 +124,7 @@ write zilla:data.ext ${pgsql:dataEx() .query() .build() .build()} -write "DROP MATERIALIZED VIEW weather_view;" +write "DROP MATERIALIZED VIEW zb_catalog.weather_view;" [0x00] write flush diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/drop.ztable/server.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/drop.ztable/server.rpt index e9a7bb2eff..b5f9145c26 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/drop.ztable/server.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/drop.ztable/server.rpt @@ -124,7 +124,7 @@ read zilla:data.ext ${pgsql:dataEx() .query() .build() .build()} -read "DROP MATERIALIZED VIEW weather_view;" +read "DROP MATERIALIZED VIEW zb_catalog.weather_view;" [0x00] write advise zilla:flush ${pgsql:flushEx() diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/query.with.multiple.statements/client.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/query.with.multiple.statements/client.rpt index 96a790603a..c73666bd4e 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/query.with.multiple.statements/client.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/query.with.multiple.statements/client.rpt @@ -64,7 +64,7 @@ write zilla:data.ext ${pgsql:dataEx() .query() .build() .build()} -write "CREATE MATERIALIZED VIEW IF NOT EXISTS cities_view AS SELECT * FROM cities_source;" +write "CREATE MATERIALIZED VIEW IF NOT EXISTS zb_catalog.cities_view AS SELECT * FROM cities_source;" [0x00] write flush @@ -134,7 +134,7 @@ write zilla:data.ext ${pgsql:dataEx() .query() .build() .build()} -write "CREATE SINK zb_catalog.cities_view_sink INTO cities FROM cities_view;" +write "CREATE SINK zb_catalog.cities_view_sink INTO cities FROM zb_catalog.cities_view;" [0x00] write flush diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/query.with.multiple.statements/server.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/query.with.multiple.statements/server.rpt index 81923bfa3b..aebe40ce01 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/query.with.multiple.statements/server.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/query.with.multiple.statements/server.rpt @@ -67,7 +67,7 @@ read zilla:data.ext ${pgsql:dataEx() .query() .build() .build()} -read "CREATE MATERIALIZED VIEW IF NOT EXISTS cities_view AS SELECT * FROM cities_source;" +read "CREATE MATERIALIZED VIEW IF NOT EXISTS zb_catalog.cities_view AS SELECT * FROM cities_source;" [0x00] write advise zilla:flush ${pgsql:flushEx() @@ -134,7 +134,7 @@ read zilla:data.ext ${pgsql:dataEx() .query() .build() .build()} -read "CREATE SINK zb_catalog.cities_view_sink INTO cities FROM cities_view;" +read "CREATE SINK zb_catalog.cities_view_sink INTO cities FROM zb_catalog.cities_view;" [0x00] write advise zilla:flush ${pgsql:flushEx() diff --git a/incubator/binding-risingwave/src/main/java/io/aklivity/zilla/runtime/binding/risingwave/internal/macro/RisingwaveCreateZtableMacro.java b/incubator/binding-risingwave/src/main/java/io/aklivity/zilla/runtime/binding/risingwave/internal/macro/RisingwaveCreateZtableMacro.java index 0700b90d45..db624cf55c 100644 --- a/incubator/binding-risingwave/src/main/java/io/aklivity/zilla/runtime/binding/risingwave/internal/macro/RisingwaveCreateZtableMacro.java +++ b/incubator/binding-risingwave/src/main/java/io/aklivity/zilla/runtime/binding/risingwave/internal/macro/RisingwaveCreateZtableMacro.java @@ -282,7 +282,7 @@ public void onStarted( select = fieldBuilder.toString(); } - String sqlQuery = String.format(sqlFormat, "%s_view".formatted(name), + String sqlQuery = String.format(sqlFormat, "%s.%s_view".formatted(systemSchema, name), "SELECT %s FROM %s_source".formatted(select, name)); handler.doExecuteSystemClient(traceId, authorization, sqlQuery); @@ -404,7 +404,7 @@ public RisingwaveMacroState onError( private final class CreateSinkIntoState implements RisingwaveMacroState { private final String sqlFormat = """ - CREATE SINK %s.%s_view_sink INTO %s FROM %s_view;\u0000"""; + CREATE SINK %s.%s_view_sink INTO %s FROM %s.%s_view;\u0000"""; @Override public void onStarted( @@ -412,7 +412,7 @@ public void onStarted( long authorization) { String name = command.name(); - String sqlQuery = String.format(sqlFormat, systemSchema, name, name, name); + String sqlQuery = String.format(sqlFormat, systemSchema, name, name, systemSchema, name); handler.doExecuteSystemClient(traceId, authorization, sqlQuery); } diff --git a/incubator/binding-risingwave/src/main/java/io/aklivity/zilla/runtime/binding/risingwave/internal/macro/RisingwaveDropZtableMacro.java b/incubator/binding-risingwave/src/main/java/io/aklivity/zilla/runtime/binding/risingwave/internal/macro/RisingwaveDropZtableMacro.java index 4a4e16523e..e101056751 100644 --- a/incubator/binding-risingwave/src/main/java/io/aklivity/zilla/runtime/binding/risingwave/internal/macro/RisingwaveDropZtableMacro.java +++ b/incubator/binding-risingwave/src/main/java/io/aklivity/zilla/runtime/binding/risingwave/internal/macro/RisingwaveDropZtableMacro.java @@ -228,14 +228,14 @@ public RisingwaveMacroState onError( private final class DropMaterializedViewState implements RisingwaveMacroState { private final String sqlFormat = """ - DROP MATERIALIZED VIEW %s_view;\u0000"""; + DROP MATERIALIZED VIEW %s.%s_view;\u0000"""; @Override public void onStarted( long traceId, long authorization) { - String sqlQuery = String.format(sqlFormat, command.name()); + String sqlQuery = String.format(sqlFormat, systemSchema, command.name()); handler.doExecuteSystemClient(traceId, authorization, sqlQuery); }