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

“ Unexpected ExprType Float64 and EvalType Int” while using cluster index #23508

Closed
aytrack opened this issue Mar 24, 2021 · 3 comments · Fixed by #23559
Closed

“ Unexpected ExprType Float64 and EvalType Int” while using cluster index #23508

aytrack opened this issue Mar 24, 2021 · 3 comments · Fixed by #23559
Assignees
Labels
affects-5.0 This bug affects 5.0.x versions. severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@aytrack
Copy link
Contributor

aytrack commented Mar 24, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE `PK_S_MULTI_42_2` (  `COL1` year(4) NOT NULL,  `COL2` year(4) NOT NULL,  `COL3` year(4) DEFAULT NULL,  PRIMARY KEY (`COL1`,`COL2`) clustered);
select * from PK_S_MULTI_42 where col2 between 2154 and 2154 AND col3 > 2153;

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

execute successfully without error

3. What did you see instead (Required)

mysql > CREATE TABLE `PK_S_MULTI_42_2` (  `COL1` year(4) NOT NULL,  `COL2` year(4) NOT NULL,  `COL3` year(4) DEFAULT NULL,  PRIMARY KEY (`COL1`,`COL2`) clustered);
Query OK, 0 rows affected
Time: 0.282s
mysql > select * from PK_S_MULTI_42_2 where col2 between 2154 and 2154 AND col3 > 2153;
(1105, 'other error: [components/tidb_query_expr/src/types/expr_builder.rs:357]: Unexpected ExprType Float64 and EvalType Int')

mysql > CREATE TABLE `PK_S_MULTI_42_1` (  `COL1` year(4) NOT NULL,  `COL2` year(4) NOT NULL,  `COL3` year(4) DEFAULT NULL,  PRIMARY KEY (`COL1`,`COL2`) nonclustered);
Query OK, 0 rows affected
Time: 0.305s
mysql > select * from PK_S_MULTI_42_1 where col2 between 2154 and 2154 AND col3 > 2153;
+------+------+------+
| COL1 | COL2 | COL3 |
+------+------+------+

4. What is your TiDB version? (Required)

master: fd706ab

@aytrack aytrack added the type/bug The issue is confirmed as a bug. label Mar 24, 2021
@lysu lysu assigned lzmhhh123 and wjhuang2016 and unassigned lysu and lzmhhh123 Mar 24, 2021
@zyguan zyguan added the sig/sql-infra SIG: SQL Infra label Mar 24, 2021
@wjhuang2016 wjhuang2016 added sig/execution SIG execution and removed sig/sql-infra SIG: SQL Infra labels Mar 26, 2021
@XuHuaiyu XuHuaiyu added sig/sql-infra SIG: SQL Infra and removed sig/execution SIG execution labels Mar 30, 2021
@XuHuaiyu
Copy link
Contributor

A bug related to clustered index, thus I change from sig/sql-infra to sig/execution

@lysu
Copy link
Contributor

lysu commented Mar 30, 2021

@XuHuaiyu this bug isn't releated to clustered index, it caused by #20338 and related to executor

@ti-srebot
Copy link
Contributor

Please edit this comment or add a new comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA) (optional)

2. Symptom (optional)

3. All Trigger Conditions (optional)

4. Workaround (optional)

5. Affected versions

6. Fixed versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.0 This bug affects 5.0.x versions. severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants