mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-25 17:30:41 +00:00
fix(mito): avoid caching empty batches in row group (#4652)
* fix: avoid caching empty batches in row group * fix: clippy * Update tests/cases/standalone/common/select/last_value.sql * fix: sqlness
This commit is contained in:
@@ -213,6 +213,10 @@ impl RowGroupLastRowReader {
|
||||
/// Updates row group's last row cache if cache manager is present.
|
||||
fn maybe_update_cache(&mut self) {
|
||||
if let Some(cache) = &self.cache_manager {
|
||||
if self.yielded_batches.is_empty() {
|
||||
// we always expect that row groups yields batches.
|
||||
return;
|
||||
}
|
||||
let value = Arc::new(SelectorResultValue {
|
||||
result: std::mem::take(&mut self.yielded_batches),
|
||||
projection: self
|
||||
|
||||
Reference in New Issue
Block a user