pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).populatePrepared at line 339
pkg/sql/plan_opt.go in pkg/sql.(*planner).prepareUsingOptimizer at line 166
pkg/sql/plan_opt.go in pkg/sql.(*optPlanningCtx).buildReusableMemo at line 465
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).Build at line 254
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot at line 275
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRootWithScope at line 294
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmt at line 355
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelect at line 1115
pkg/sql/opt/optbuilder/with.go in pkg/sql/opt/optbuilder.(*Builder).processWiths at line 111
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelect.func1 at line 1116
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelectStmtWithoutParens at line 1164
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelectClause at line 1232
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildFrom at line 1316
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildFromTables at line 1386
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildFromTablesRightDeep at line 1409
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildDataSource at line 89
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildDataSource at line 159
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildScan at line 767
pkg/sql/opt/optbuilder/partial_index.go in pkg/sql/opt/optbuilder.(*Builder).addPartialIndexPredicatesForTable at line 99
pkg/sql/opt/optbuilder/partial_index.go in pkg/sql/opt/optbuilder.(*Builder).buildPartialIndexPredicate at line 171
bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go in pkg/sql/opt/norm.(*Factory).ConstructSelect at line 1560
bazel-out/k8-opt/bin/pkg/sql/opt/memo/expr.og.go in pkg/sql/opt/memo.(*Memo).MemoizeSelect at line 21008
pkg/sql/opt/memo/logical_props_builder.go in pkg/sql/opt/memo.(*logicalPropsBuilder).buildSelectProps at line 302
pkg/sql/opt/memo/statistics_builder.go in pkg/sql/opt/memo.(*statisticsBuilder).buildSelect at line 1083
pkg/sql/opt/memo/statistics_builder.go in pkg/sql/opt/memo.(*statisticsBuilder).filterRelExpr at line 3281
pkg/sql/opt/memo/statistics_builder.go in pkg/sql/opt/memo.(*statisticsBuilder).applyFilters at line 3332
pkg/sql/opt/memo/statistics_builder.go in pkg/sql/opt/memo.(*statisticsBuilder).applyFiltersItem at line 3374
pkg/sql/opt/memo/statistics_builder.go in pkg/sql/opt/memo.(*statisticsBuilder).factorOutVirtualCols at line 5138
pkg/sql/opt/colset.go in pkg/sql/opt.ColSet.ForEach at line 78
pkg/util/intsets/fast.go in pkg/util/intsets.Fast.ForEach at line 154
pkg/sql/opt/colset.go in pkg/sql/opt/memo.(*statisticsBuilder).factorOutVirtualCols.ColSet.ForEach.func3 at line 78
pkg/sql/opt/memo/statistics_builder.go in pkg/sql/opt/memo.(*statisticsBuilder).factorOutVirtualCols.func1 at line 5146
This issue was auto filed by Sentry. It represents a crash or reported error on a live cluster with telemetry enabled.
Sentry Link: https://cockroach-labs.sentry.io/issues/6104983408/?referrer=webhooks_plugin
Panic Message:
Stacktrace (expand for inline code snippets):
[https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/conn_executor_prepare.go#L338-L340](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/conn_executor_prepare.go#L338-L340) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/plan_opt.go#L165-L167](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/plan_opt.go#L165-L167) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/plan_opt.go#L464-L466](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/plan_opt.go#L464-L466) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/builder.go#L253-L255](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/builder.go#L253-L255) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/builder.go#L274-L276](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/builder.go#L274-L276) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/builder.go#L293-L295](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/builder.go#L293-L295) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/builder.go#L354-L356](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/builder.go#L354-L356) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L1114-L1116](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L1114-L1116) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/with.go#L110-L112](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/with.go#L110-L112) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L1115-L1117](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L1115-L1117) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L1163-L1165](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L1163-L1165) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L1231-L1233](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L1231-L1233) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L1315-L1317](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L1315-L1317) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L1385-L1387](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L1385-L1387) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L1408-L1410](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L1408-L1410) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L88-L90](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L88-L90) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L158-L160](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L158-L160) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L766-L768](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/select.go#L766-L768) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/partial_index.go#L98-L100](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/partial_index.go#L98-L100) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/partial_index.go#L170-L172](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/optbuilder/partial_index.go#L170-L172) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go#L1559-L1561](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go#L1559-L1561) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/bazel-out/k8-opt/bin/pkg/sql/opt/memo/expr.og.go#L21007-L21009](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/bazel-out/k8-opt/bin/pkg/sql/opt/memo/expr.og.go#L21007-L21009) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/memo/logical_props_builder.go#L301-L303](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/memo/logical_props_builder.go#L301-L303) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/memo/statistics_builder.go#L1082-L1084](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/memo/statistics_builder.go#L1082-L1084) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/memo/statistics_builder.go#L3280-L3282](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/memo/statistics_builder.go#L3280-L3282) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/memo/statistics_builder.go#L3331-L3333](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/memo/statistics_builder.go#L3331-L3333) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/memo/statistics_builder.go#L3373-L3375](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/memo/statistics_builder.go#L3373-L3375) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/memo/statistics_builder.go#L5137-L5139](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/memo/statistics_builder.go#L5137-L5139) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/colset.go#L77-L79](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/colset.go#L77-L79) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/util/intsets/fast.go#L153-L155](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/util/intsets/fast.go#L153-L155) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/colset.go#L77-L79](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/colset.go#L77-L79) [https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/memo/statistics_builder.go#L5145-L5147](https://github.com/cockroachdb/cockroach/blob/3613a619e327fb412ac62036ce2c7060c25e48db/pkg/sql/opt/memo/statistics_builder.go#L5145-L5147)Tags
Jira issue: CRDB-45082