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

ResolveIndices Can't find column Column#40 in schema Column #41957

Closed
xuyifangreeneyes opened this issue Mar 6, 2023 · 0 comments · Fixed by #47612
Closed

ResolveIndices Can't find column Column#40 in schema Column #41957

xuyifangreeneyes opened this issue Mar 6, 2023 · 0 comments · Fixed by #47612
Assignees
Labels

Comments

@xuyifangreeneyes
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

The query is compiled successfully.

3. What did you see instead (Required)

It throws an error Can't find column Column#40 in schema Column .

[2023/03/06 19:06:04.794 +08:00] [INFO] [conn.go:1158] ["command dispatched failed"] [conn=1362983201093452183] [connInfo="id:1362983201093452183, addr:127.0.0.1:65448 status:10, collation:utf8mb4_0900_ai_ci, user:root"] [command=Query] [status="inTxn:0, autocommit:1"] [sql="SELECT
    repo_id, GROUP_CONCAT(
      DISTINCT actor_login
      ORDER BY cnt DESC
      SEPARATOR ','
    ) AS actor_logins
FROM (
    SELECT
        ge.repo_id AS repo_id,
        ge.actor_login AS actor_login,
        COUNT(*) AS cnt
    FROM github_events ge
    WHERE
        type = 'PullRequestEvent' AND action = 'opened'
        AND (ge.created_at >= DATE_SUB(NOW(), INTERVAL 1 DAY) AND ge.created_at <= NOW())
    GROUP BY ge.repo_id, ge.actor_login
    ORDER BY cnt DESC
) sub
GROUP BY repo_id"] [txn_mode=PESSIMISTIC] [timestamp=0] [err="Can't find column Column#40 in schema Column: [Column#37,gharchive_dev.github_events.repo_id,gharchive_dev.github_events.actor_login] Unique key: [[gharchive_dev.github_events.repo_id,gharchive_dev.github_events.actor_login]]
github.com/pingcap/tidb/expression.(*Column).resolveIndices
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/expression/column.go:534
github.com/pingcap/tidb/expression.(*Column).ResolveIndices
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/expression/column.go:527
github.com/pingcap/tidb/planner/core.(*basePhysicalAgg).ResolveIndices
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:428
github.com/pingcap/tidb/planner/core.(*basePhysicalPlan).ResolveIndices
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:710
github.com/pingcap/tidb/planner/core.(*physicalSchemaProducer).ResolveIndices
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:699
github.com/pingcap/tidb/planner/core.(*PhysicalProjection).ResolveIndices
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:42
github.com/pingcap/tidb/planner/core.physicalOptimize
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/optimizer.go:1117
github.com/pingcap/tidb/planner/core.DoOptimize
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/optimizer.go:299
github.com/pingcap/tidb/planner.optimize
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/planner/optimize.go:436
github.com/pingcap/tidb/planner.Optimize
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/planner/optimize.go:264
github.com/pingcap/tidb/executor.(*Compiler).Compile
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/executor/compiler.go:112
github.com/pingcap/tidb/session.(*session).ExecuteStmt
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:2161
github.com/pingcap/tidb/server.(*TiDBContext).ExecuteStmt
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/driver_tidb.go:247
github.com/pingcap/tidb/server.(*clientConn).handleStmt
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1999
github.com/pingcap/tidb/server.(*clientConn).handleQuery
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1849
github.com/pingcap/tidb/server.(*clientConn).dispatch
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1380
github.com/pingcap/tidb/server.(*clientConn).Run
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1129
github.com/pingcap/tidb/server.(*Server).onConn
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/server.go:625
runtime.goexit
	/usr/local/go1.19.5/src/runtime/asm_amd64.s:1594"]

4. What is your TiDB version? (Required)

v6.6.0

@xuyifangreeneyes xuyifangreeneyes added type/bug The issue is confirmed as a bug. sig/planner SIG: Planner labels Mar 6, 2023
@seiya-annie seiya-annie added sig/planner SIG: Planner severity/major and removed sig/planner SIG: Planner labels Mar 7, 2023
@ti-chi-bot ti-chi-bot added may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 labels Mar 7, 2023
@AilinKid AilinKid self-assigned this Aug 24, 2023
@AilinKid AilinKid removed may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-6.1 may-affects-6.5 labels Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants