ZoneMap bug when using cached compiled query #1362
Description
When a cached compiled query is reused for the second time, ZoneMapManager::ShouldScanTileGroup
always returns false and causes error Conditional jump or move depends on uninitialised value(s)
in valgrind . This is because the argument parsed_predicates
is only populated when the query is compiled for the first time but needed at runtime whenever the compiled query is executed. However, when the compiled query is executed for the first time, RuntimeFunctions::FillPredicateArray
clears the its plan's parsed_predicate_
. Therefore, the parsed_predicates
argument for ZoneMapManager::ShouldScanTileGroup
is always incorrect when the compiled query is reused.
We solved this problem in our PR(#1339) by avoid using predicate_array
and calling RuntimeFunctions:: FillPredicateArray
.