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

query reports "Can't find a proper physical plan for this query" #49438

Closed
wjhuang2016 opened this issue Dec 13, 2023 · 4 comments · Fixed by #52067
Closed

query reports "Can't find a proper physical plan for this query" #49438

wjhuang2016 opened this issue Dec 13, 2023 · 4 comments · Fixed by #52067
Assignees

Comments

@wjhuang2016
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE `tl1b9523cf` (
  `col_1` double DEFAULT NULL,
  `col_2` date DEFAULT '2032-02-22',
  `col_3` varbinary(337) NOT NULL DEFAULT 'jeHvC6^7v',
  `col_4` varbinary(247) NOT NULL,
  `col_5` timestamp NOT NULL,
  `col_6` json DEFAULT NULL,
  `col_7` json NOT NULL,
  `col_8` enum('Alice','Bob','Charlie','David') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'David',
  KEY `idx_1` (`col_2`,`col_1`),
  KEY `idx_2` (`col_1`),
  KEY `idx_3` (`col_3`(1),`col_8`,(cast(`col_6` as datetime array))),
  UNIQUE KEY `idx_4` (`col_1`,(cast(`col_7` as date array)),`col_3`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
desc select  tl1b9523cf.col_3 as r0 , tl1b9523cf.col_1 as r1 from tl1b9523cf where tl1b9523cf.col_1 in ( 5286.70512761001 ,1720.6188106198429 ,6342.041981907588 ,4051.931997825317 );

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

No error

3. What did you see instead (Required)

mysql> desc select  tl1b9523cf.col_3 as r0 , tl1b9523cf.col_1 as r1 from tl1b9523cf where tl1b9523cf.col_1 in ( 5286.70512761001 ,1720.6188106198429 ,6342.041981907588 ,4051.931997825317 );
ERROR 1815 (HY000): Internal : Can't find a proper physical plan for this query

4. What is your TiDB version? (Required)

nightly-a7260ff598ce0e7c0a77367e84ec265f91b8073e

@qw4990
Copy link
Contributor

qw4990 commented Mar 25, 2024

The minimum reproducible case:

create table tx (a int, b json, key k(a, (cast(b as date array))));
select 1 from tx where a in (1);

@kennedy8312
Copy link

/label affects-7.1

@kennedy8312
Copy link

mysql> desc select tl1b9523cf.col_3 as r0 , tl1b9523cf.col_1 as r1 from tl1b9523cf where tl1b9523cf.col_1 in ( 5286.70512761001 ,1720.6188106198429 ,6342.041981907588 ,4051.931997825317 );
ERROR 1815 (HY000): Internal : Can't find a proper physical plan for this query
mysql> select tidb_version();
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v7.1.4
Edition: Community
Git Commit Hash: a8b650f
Git Branch: heads/refs/tags/v7.1.4
UTC Build Time: 2024-03-07 08:14:40
GoVersion: go1.20.12
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: tikv |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

@winoros
Copy link
Member

winoros commented Apr 15, 2024

Note that mv index is not GA in v7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants