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

TPCH q8 return different result when running with TiFlash and TiKV #7022

Closed
windtalker opened this issue Mar 10, 2023 · 0 comments · Fixed by #7035
Closed

TPCH q8 return different result when running with TiFlash and TiKV #7022

windtalker opened this issue Mar 10, 2023 · 0 comments · Fixed by #7035

Comments

@windtalker
Copy link
Contributor

windtalker commented Mar 10, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. load tpch 10
  2. running tpch q8 with tiflash enabled
  3. running tpch q8 with tiflash disabled

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

running with tiflash and running with tikv should return the same result

3. What did you see instead (Required)

MySQL [test]> source /tmp/8.sql
+--------+---------------+-----------------+------------+
| o_year | c1            | c2              | mkt_share  |
+--------+---------------+-----------------+------------+
|   1995 | 86174753.6705 | 2184536777.5059 | 0.03944760 |
|   1996 | 85697154.4007 | 2216626585.7168 | 0.03866106 |
+--------+---------------+-----------------+------------+
2 rows in set (5.57 sec)

MySQL [test]> set tidb_isolation_read_engines='tikv';
Query OK, 0 rows affected (0.00 sec)

MySQL [test]> source /tmp/8.sql
+--------+---------------+-----------------+------------+
| o_year | c1            | c2              | mkt_share  |
+--------+---------------+-----------------+------------+
|   1995 | 86174753.6705 | 2184536777.5059 | 0.03944761 |
|   1996 | 85697154.4007 | 2216626585.7168 | 0.03866107 |
+--------+---------------+-----------------+------------+
2 rows in set (21.54 sec)

MySQL [test]> select 86174753.6705/2184536777.5059;
+-------------------------------+
| 86174753.6705/2184536777.5059 |
+-------------------------------+
|                    0.03944761 |
+-------------------------------+
1 row in set (0.01 sec)

And looks like the result of tikv is the right answer.

4. What is your TiFlash version? (Required)

master, v6.5

5. Investigate

In v6.1.3 the result is the same, but in v6.1.3 the final divide is calulated in TiDB, and in v6.5 and master, the final divide is pushed to TiFlash, I think it is related to this issue: #6462

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.

3 participants