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

In rough set filter works occasionally incorrectly #8631

Closed
yibin87 opened this issue Jan 2, 2024 · 2 comments · Fixed by #8634
Closed

In rough set filter works occasionally incorrectly #8631

yibin87 opened this issue Jan 2, 2024 · 2 comments · Fixed by #8634

Comments

@yibin87
Copy link
Contributor

yibin87 commented Jan 2, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> create table t (a int, b int);
mysql> insert into t values(10,30);
mysql> insert into t values(50,60);
mysql> alter table t set tiflash replica 1;
mysql> set session tidb_isolation_read_engines='tiflash';
mysql> select * from t where not a not in (0, cast(+ a as signed));

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

Always return 2 results:
+------+------+
| a | b |
+------+------+
| 10 | 30 |
| 50 | 60 |
+------+------+

3. What did you see instead (Required)

After try about 20-30 times, it returns empty result set, and then always return empty set.
+----------------------------+---------+---------+--------------+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+-----------+------+
| id | estRows | actRows | task | access object | execution info | operator info | memory | disk |
+----------------------------+---------+---------+--------------+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+-----------+------+
| TableReader_13 | 1.60 | 0 | root | | time:7.99ms, loops:1, RU:0.000000, cop_task: {num: 1, max: 0s, proc_keys: 0, copr_cache_hit_ratio: 0.00} | MppVersion: 2, data:ExchangeSender_12 | 305 Bytes | N/A |
| └─ExchangeSender_12 | 1.60 | 0 | mpp[tiflash] | | tiflash_task:{time:6.75ms, loops:0, threads:8} | ExchangeType: PassThrough | N/A | N/A |
| └─Selection_11 | 1.60 | 0 | mpp[tiflash] | | tiflash_task:{time:6.75ms, loops:0, threads:8} | in(test.t.a, 0, cast(test.t.a, bigint(22) BINARY)) | N/A | N/A |
| └─TableFullScan_10 | 2.00 | 0 | mpp[tiflash] | table:t | tiflash_task:{time:6.75ms, loops:0, threads:8}, tiflash_scan:{dtfile:{total_scanned_packs:0, total_skipped_packs:1, total_scanned_rows:0, total_skipped_rows:2, total_rs_index_check_time: 0ms, total_read_time: 0ms, total_disagg_read_cache_hit_size: 0, total_disagg_read_cache_miss_size: 0}, total_create_snapshot_time: 0ms, total_local_region_num: 1, total_remote_region_num: 0, total_learner_read_time: 0ms} | pushed down filter:empty, keep order:false, stats:pseudo | N/A | N/A |
+----------------------------+---------+---------+--------------+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+-----------+------+

4. What is your TiFlash version? (Required)

Git hash: ce42814

@JaySon-Huang
Copy link
Contributor

/assign @Lloyd-Pottiger

@Lloyd-Pottiger
Copy link
Contributor

the filter:

        conditions { 
          tp: ScalarFunc 
          children { 
            tp: ColumnRef 
            val: \"\\200\\000\\000\\000\\000\\000\\000\\000\" 
            sig: Unspecified field_type { tp: 3 flag: 0 flen: 11 decimal: 0 collate: -63 charset: \"binary\" array: false } 
            has_distinct: 
            false 
          } 
          children { 
            tp: Int64 
            val: \"\\200\\000\\000\\000\\000\\000\\000\\000\" 
            sig: Unspecified 
            field_type { tp: 3 flag: 0 flen: 11 decimal: 0 collate: -63 charset: \"binary\" array: false } has_distinct: false 
          } 
          children { 
            tp: ScalarFunc 
            val: \"\\010\\000\" 
            children { 
              tp: ColumnRef 
              val: \"\\200\\000\\000\\000\\000\\000\\000\\000\" 
              sig: Unspecified 
              field_type { tp: 3 flag: 0 flen: 11 decimal: 0 collate: -63 charset: \"binary\" array: false } 
              has_distinct: false 
            } 
            sig: CastIntAsInt 
            field_type { tp: 8 flag: 128 flen: 22 decimal: 0 collate: -63 charset: \"binary\" array: false } 
            has_distinct: false 
          } 
          sig: InInt 
          field_type { tp: 8 flag: 524416 flen: 1 decimal: 0 collate: -63 charset: \"binary\" array: false } 
          has_distinct: false 
      } 

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