Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore(starrocks): bump omni to PR3 DML features (diagnose accuracy) (#20618)
Vincent Huang39c68a8ee67d
diff --git a/backend/plugin/parser/starrocks/diagnose_pr3_test.go b/backend/plugin/parser/starrocks/diagnose_pr3_test.gonew file mode 100644index 0000000000..5c7a1eb7da--- /dev/null+++ b/backend/plugin/parser/starrocks/diagnose_pr3_test.go@@ -0,0 +1,55 @@+package starrocks++import (+ "context"+ "testing"++ storepb "github.com/bytebase/bytebase/backend/generated-go/store"+ "github.com/bytebase/bytebase/backend/plugin/parser/base"+)++// TestStarRocksPR3DiagnoseE2E is the value-chain keystone for the PR3 DML+// features (omni #309): the new StarRocks DML forms now parse through the+// omni/starrocks fork, so Bytebase's diagnose path stops reporting false+// syntax errors on them (the deliverable is parse-accept, not lineage). Before+// the omni dep bump these forms do not parse and produce a diagnostic; after,+// they diagnose clean. A genuinely-invalid statement still reports an error.+func TestStarRocksPR3DiagnoseE2E(t *testing.T) {+ cases := []struct {+ name string+ sql string+ wantDiag bool+ }{+ {+ "insert_overwrite_no_table", // PR3: INSERT OVERWRITE t (no TABLE)+ "INSERT OVERWRITE t SELECT a FROM src",+ false,+ },+ {+ "cte_delete", // PR3: WITH … DELETE+ "WITH c AS (SELECT id FROM s) DELETE FROM t WHERE id IN (SELECT id FROM c)",+ false,+ },+ {+ "async_mv_refresh_every", // PR3: REFRESH ASYNC EVERY (INTERVAL …)+ "CREATE MATERIALIZED VIEW mv REFRESH ASYNC EVERY (INTERVAL 1 DAY) AS SELECT a FROM t",+ false,+ },+ {+ "invalid_statement", // diagnose still catches real syntax errors+ "INSERT OVERWRITE t BY NAME (a) SELECT a FROM s", // BY NAME + col list — rejected+ true,+ },+ }+ for _, tc := range cases {+ t.Run(tc.name, func(t *testing.T) {+ diags, err := base.Diagnose(context.Background(), base.DiagnoseContext{}, storepb.Engine_STARROCKS, tc.sql)+ if err != nil {+ t.Fatalf("Diagnose error: %v", err)+ }+ if got := len(diags) > 0; got != tc.wantDiag {+ t.Fatalf("Diagnose(%q): hasDiagnostic=%v, want %v (diags=%+v)", tc.sql, got, tc.wantDiag, diags)+ }+ })+ }+}diff --git a/go.mod b/go.modindex 8fb0d14a4e..84fe519e47 100644--- a/go.mod+++ b/go.mod@@ -34,7 +34,7 @@ require (github.com/bmatcuk/doublestar/v4 v4.10.0github.com/bytebase/gomongo v0.0.0-20260510192859-8526a440b352github.com/bytebase/lsp-protocol v0.0.0-20250324071136-1586d0c10ff0- github.com/bytebase/omni v0.0.0-20260616044321-57b574a371c1+ github.com/bytebase/omni v0.0.0-20260616095434-7e1369f4045agithub.com/caarlos0/env/v11 v11.4.1github.com/cenkalti/backoff/v5 v5.0.3github.com/cockroachdb/cockroachdb-parser v0.25.2diff --git a/go.sum b/go.sumindex 759c731261..d9c464faf3 100644--- a/go.sum+++ b/go.sum@@ -250,8 +250,8 @@ github.com/bytebase/gomongo v0.0.0-20260510192859-8526a440b352 h1:3sC5pdvJ7bNAhRgithub.com/bytebase/gomongo v0.0.0-20260510192859-8526a440b352/go.mod h1:eyWrxE51HCbjGIChvty/mYaNcAroXshnIiR6SIqlxfY=github.com/bytebase/lsp-protocol v0.0.0-20250324071136-1586d0c10ff0 h1:bJ8NSf2K+pccl5m/wuu97fiYjDwpJH6IzURAq/3XA2U=github.com/bytebase/lsp-protocol v0.0.0-20250324071136-1586d0c10ff0/go.mod h1:BEWMfiZtqshdmulKJcIsWb45MUaEvDO4CROcgi8dfFg=-github.com/bytebase/omni v0.0.0-20260616044321-57b574a371c1 h1:U8dSPmTkVxEXBms3fyxneXlBUKqJCnyU+nSaJXyj/yA=-github.com/bytebase/omni v0.0.0-20260616044321-57b574a371c1/go.mod h1:EVG8nQbNPUnUBGKn6J0niSGOs3jgfKo3TciY22R4bfo=+github.com/bytebase/omni v0.0.0-20260616095434-7e1369f4045a h1:X0mpevdOyNtq4u3Lkv+SqtZ9HjeOlY59eAXG9Vssaq8=+github.com/bytebase/omni v0.0.0-20260616095434-7e1369f4045a/go.mod h1:EVG8nQbNPUnUBGKn6J0niSGOs3jgfKo3TciY22R4bfo=github.com/bytebase/parser v0.0.0-20260417075056-57b6ef7a2640 h1:g4Jed1/Jv/DHBiQmEgN5ILOQDDBjFlG4N4Lp+3B4aYE=github.com/bytebase/parser v0.0.0-20260417075056-57b6ef7a2640/go.mod h1:jeak/EfutSOAuWKvrFIT2IZunhWprM7oTFBRgZ9RCxo=github.com/bytebase/pgx/v5 v5.0.0-20250212161523-96ff8aed8767 h1:YuR5G3LcxpO5ScSTA+Kdirxg9RW4TRc/v1t7N2Hfmbw=