Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql-queries: unoptimize-query-oracle failure from 141581 #143070

Open
mgartner opened this issue Mar 18, 2025 · 2 comments
Open

sql-queries: unoptimize-query-oracle failure from 141581 #143070

mgartner opened this issue Mar 18, 2025 · 2 comments
Labels
branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-roachtest T-sql-queries SQL Queries Team

Comments

@mgartner
Copy link
Collaborator

mgartner commented Mar 18, 2025

Failure from #141581:

CREATE TABLE t (
  a INT NOT NULL,
  b INT NOT NULL,
  c STRING NOT NULL AS (a::string) VIRTUAL,
  d STRING NOT NULL AS (b::string) VIRTUAL,
  PRIMARY KEY (a, b),
  INVERTED INDEX (d gin_trgm_ops)
);

SELECT 1 FROM t AS t1 JOIN t AS t2 ON t1.c = t2.d WHERE t1.c LIKE 'aaa';

Jira issue: CRDB-48643

@mgartner mgartner added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Mar 18, 2025
Copy link

blathers-crl bot commented Mar 18, 2025

Hi @mgartner, please add branch-* labels to identify which branch(es) this C-bug affects.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@mgartner mgartner changed the title sql-queries: unoptimize-query-oracle failure from 141581 (1) sql-queries: unoptimize-query-oracle failure from 141581 Mar 18, 2025
@mgartner
Copy link
Collaborator Author

        (XX000) internal error: output cols mismatch: (11) vs (10,11)
        verify.go:82: in VerifyAgainst()
        DETAIL: stack trace:
        pkg/sql/opt/props/verify.go:82: VerifyAgainst()
        pkg/sql/opt/memo/check_expr.go:52: CheckExpr()
        bazel-out/k8-fastbuild/bin/pkg/sql/opt/memo/expr.og.go:25377: AddSelectToGroup()
        pkg/sql/opt/xform/index_scan_builder.go:265: Build()
        pkg/sql/opt/xform/select_funcs.go:1001: func1()
        pkg/sql/opt/xform/scan_index_iter.go:317: ForEachStartingAfter()
        pkg/sql/opt/xform/scan_index_iter.go:209: ForEach()
        pkg/sql/opt/xform/select_funcs.go:902: generateInvertedIndexScansImpl()
        pkg/sql/opt/xform/select_funcs.go:847: GenerateInvertedIndexScans()
        bazel-out/k8-fastbuild/bin/pkg/sql/opt/xform/explorer.og.go:400: exploreSelect()
        bazel-out/k8-fastbuild/bin/pkg/sql/opt/xform/explorer.og.go:26: exploreGroupMember()
        pkg/sql/opt/xform/explorer.go:180: exploreGroup()
        pkg/sql/opt/xform/optimizer.go:559: optimizeGroup()
        pkg/sql/opt/xform/optimizer.go:296: optimizeExpr()
        pkg/sql/opt/xform/optimizer.go:604: optimizeGroupMember()
        pkg/sql/opt/xform/optimizer.go:546: optimizeGroup()
        pkg/sql/opt/xform/optimizer.go:296: optimizeExpr()
        pkg/sql/opt/xform/optimizer.go:604: optimizeGroupMember()
        pkg/sql/opt/xform/optimizer.go:546: optimizeGroup()
        pkg/sql/opt/xform/optimizer.go:296: optimizeExpr()
        pkg/sql/opt/xform/optimizer.go:604: optimizeGroupMember()
        pkg/sql/opt/xform/optimizer.go:546: optimizeGroup()
        pkg/sql/opt/xform/optimizer.go:746: optimizeEnforcer()
        pkg/sql/opt/xform/optimizer.go:698: enforceProps()
        pkg/sql/opt/xform/optimizer.go:589: optimizeGroupMember()
        pkg/sql/opt/xform/optimizer.go:546: optimizeGroup()
        pkg/sql/opt/xform/optimizer.go:266: Optimize()
        pkg/sql/plan_opt.go:862: buildExecMemo()
        pkg/sql/plan_opt.go:260: makeOptimizerPlan()
        pkg/sql/conn_executor_exec.go:3303: makeExecPlan()
        pkg/sql/conn_executor_exec.go:2851: dispatchToExecutionEngine()
        pkg/sql/conn_executor_exec.go:2118: execStmtInOpenStateWithPausablePortal()

@mgartner mgartner added branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). and removed C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. labels Mar 18, 2025
@github-project-automation github-project-automation bot moved this to Triage in SQL Queries Mar 18, 2025
@yuzefovich yuzefovich added the T-sql-queries SQL Queries Team label Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-roachtest T-sql-queries SQL Queries Team
Projects
Status: Triage
Development

No branches or pull requests

2 participants