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

Different microSecond result between non-vectorized and vectorized expression #29244

Closed
wshwsh12 opened this issue Oct 29, 2021 · 2 comments · Fixed by #29310
Closed

Different microSecond result between non-vectorized and vectorized expression #29244

wshwsh12 opened this issue Oct 29, 2021 · 2 comments · Fixed by #29310
Assignees
Labels
affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. severity/critical sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@wshwsh12
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

drop table t;
create table t(a time(4));
insert into t values("-700:10:10.123456111");
set tidb_enable_vectorized_expression = on;
select microsecond(a) from t;
set tidb_enable_vectorized_expression = off;
select microsecond(a) from t;

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

Same result.

[tidb]> select microsecond(a) from t;
+----------------+
| microsecond(a) |
+----------------+
|         123500 |
+----------------+
1 row in set (0.001 sec)

3. What did you see instead (Required)

[tidb]> set tidb_enable_vectorized_expression = on;
Query OK, 0 rows affected (0.000 sec)

[tidb]> select microsecond(a) from t;
+----------------+
| microsecond(a) |
+----------------+
|        -123500 |
+----------------+
1 row in set (0.001 sec)

[tidb]> set tidb_enable_vectorized_expression = off;
Query OK, 0 rows affected (0.000 sec)

[tidb]> select microsecond(a) from t;
+----------------+
| microsecond(a) |
+----------------+
|         123500 |
+----------------+
1 row in set (0.001 sec)

4. What is your TiDB version? (Required)

master

@wshwsh12 wshwsh12 added the type/bug The issue is confirmed as a bug. label Oct 29, 2021
@ChenPeng2013 ChenPeng2013 added affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. severity/critical sig/planner SIG: Planner sig/execution SIG execution and removed sig/planner SIG: Planner labels Oct 29, 2021
@Defined2014
Copy link
Contributor

/assign

@github-actions
Copy link

github-actions bot commented Nov 3, 2021

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. severity/critical sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants