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

analyze cannot be with json's virtual column #57079

Closed
hawkingrei opened this issue Nov 3, 2024 · 0 comments · Fixed by #57084
Closed

analyze cannot be with json's virtual column #57079

hawkingrei opened this issue Nov 3, 2024 · 0 comments · Fixed by #57084
Labels
affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@hawkingrei
Copy link
Member

hawkingrei commented Nov 3, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE `t1` (
  `id` bigint(20) NOT NULL /*T![auto_rand] AUTO_RANDOM(5) */ ,
  `c1` json DEFAULT NULL ,
  `c2` varchar(255) GENERATED ALWAYS AS (json_unquote(json_extract(`c1`, '$.code'))) VIRTUAL ,
  PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin /*T![auto_rand_base] AUTO_RANDOM_BASE=7765648957 */ ;
analyze table t1

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

succeed to run

3. What did you see instead (Required)

(1054, "Unknown column 'c1' in 'expression'")

4. What is your TiDB version? (Required)

@hawkingrei hawkingrei added type/bug The issue is confirmed as a bug. sig/planner SIG: Planner severity/moderate labels Nov 3, 2024
@ti-chi-bot ti-chi-bot bot added affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-8.4 affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. labels Nov 4, 2024
@hawkingrei hawkingrei removed affects-8.4 affects-8.5 This bug affects the 8.5.x(LTS) versions. labels Nov 4, 2024
ti-chi-bot bot pushed a commit that referenced this issue Nov 11, 2024
@hawkingrei hawkingrei removed affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. labels Nov 12, 2024
@jebter jebter added the affects-8.5 This bug affects the 8.5.x(LTS) versions. label Nov 12, 2024
ti-chi-bot bot pushed a commit that referenced this issue Nov 12, 2024
ti-chi-bot bot pushed a commit that referenced this issue Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants