Skip to content
← Back to activity

Immutable solution version

[Runtime Filter] The ```Unexpected empty values``` error when filter values is empty

Version 1Sign in to save

Complete solution

[elsa0520 (reporter)]: The root cause is that the build side of is empty. So that the filter values is empty.

What was reported: GitHub issue pingcap/tidb#45300 (closed, 20 comments): ## Bug Report Please answer these questions before submitting your issue. Thanks! ### 1. Minimal reproduce step (Required) 1. create table `` create table right_empty_table(k1 int); alter table right_empty_table set tiflash replica 1; create table left_table(k1 int, k2 int); insert into left_table values (1,1); alter table left_table set tiflash replica 1; set tidb_isolation_read_engines="tidb,tiflash"; 2. enable runtime filter local set tidb_runtime_filter_mode=LOCAL; 3. query `` mysql> select /+ hashjoinbuild(rightemptytable) / * from lefttable , rightempty_table where

What works: [elsa0520 (reporter)]: The root cause is that the build side of ``right_empty_table is empty. So that the filter values is empty. When the filter convert to RS operator, the storage engine forbidden the empty IN RS operator. So it throws the Unexpected empty values error. The code of storage engine IN.h from tiflash/dbms/src/storage/delatmerge/Filter/In.h In(const Attr & attr_, const Fields & values_) : attr(attr_) , values(values_) { if (unlikely(values.empty())) throw Exception("Unexpected empty values"); }

Evidence

In the GitHub issue, the reporter asked: [Runtime Filter] The ``Unexpected empty values error when filter values is empty. The working answer that came out of the thread: [elsa0520 (reporter)]: The root cause is that the build side of is empty. So that the filter values is empty. When the filter convert to RS operator, the storage engine forbidden the empty IN RS operator. So it throws the error. The code of storage engine from In(const Attr & attr_, const Fields & values_) : attr(attr_) , values(values_) { if (unlikely(values.empty())) throw Exception("Unexpected empty values"); } Source: https://github.com/pingcap/tidb/issues/45300

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_fWBobzKvvH1s77dW2WoB6Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">[Runtime Filter] The ```Unexpected empty values``` error when filter values is empty <span>— Vectle</span></a>