mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-10-28 14:46:22 +00:00
docs: explain instant LastRow filter eligibility
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
This commit is contained in:
@@ -132,6 +132,17 @@ impl ScanHintRule {
|
||||
Ok(Transformed::yes(LogicalPlan::TableScan(table_scan)))
|
||||
}
|
||||
|
||||
/// Checks whether attached scan predicates permit instant-derived LastRow selection.
|
||||
///
|
||||
/// Selecting the newest row too early can discard an older matching sample if a
|
||||
/// predicate later rejects that row. Only recognized tag/time predicates are
|
||||
/// allowed: tags select whole series, and supported time predicates constrain
|
||||
/// the scan window before row selection. Field or unrecognized predicates are
|
||||
/// conservatively rejected. Finer-than-millisecond timestamps are also excluded
|
||||
/// because instant evaluation can conflate distinct samples at that precision.
|
||||
///
|
||||
/// This checks only attached predicates; the rewriter separately rejects residual
|
||||
/// Filter nodes between InstantManipulate and the scan.
|
||||
fn filters_preserve_last_row(
|
||||
table_scan: &datafusion_expr::logical_plan::TableScan,
|
||||
provider: &DummyTableProvider,
|
||||
|
||||
Reference in New Issue
Block a user