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 5.4.x versions. affects-7.5 affects-8.1 affects-8.5 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 bot pushed a commit that referenced this issue Nov 11, 2024
ti-chi-bot bot pushed a commit that referenced this issue Nov 12, 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 5.4.x versions. affects-7.5 affects-8.1 affects-8.5 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