mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-06-05 14:50:44 +00:00
feat: initial implementation for range cache with time filters (#8130)
* feat: initial implementation for range cache time filters Signed-off-by: evenyag <realevenyag@gmail.com> * refactor: tighten Lt implied time range bound Signed-off-by: evenyag <realevenyag@gmail.com> * docs: tighten range cache key comment Signed-off-by: evenyag <realevenyag@gmail.com> * fix: skip range cache unit asserts on empty implied range Signed-off-by: evenyag <realevenyag@gmail.com> --------- Signed-off-by: evenyag <realevenyag@gmail.com>
This commit is contained in:
@@ -41,7 +41,7 @@ mod stats;
|
||||
/// In theory, it should be converted to a timestamp scalar value by `TypeConversionRule`.
|
||||
macro_rules! return_none_if_utf8 {
|
||||
($lit: ident) => {
|
||||
if matches!($lit, ScalarValue::Utf8(_)) {
|
||||
if is_string_timestamp_literal($lit) {
|
||||
warn!(
|
||||
"Unexpected ScalarValue::Utf8 in time range predicate: {:?}. Maybe it's an implicit bug, please report it to https://github.com/GreptimeTeam/greptimedb/issues",
|
||||
$lit
|
||||
@@ -53,6 +53,13 @@ macro_rules! return_none_if_utf8 {
|
||||
};
|
||||
}
|
||||
|
||||
pub fn is_string_timestamp_literal(scalar: &ScalarValue) -> bool {
|
||||
matches!(
|
||||
scalar,
|
||||
ScalarValue::Utf8(_) | ScalarValue::LargeUtf8(_) | ScalarValue::Utf8View(_)
|
||||
)
|
||||
}
|
||||
|
||||
/// Reference-counted pointer to a list of logical exprs and a list of dynamic filter physical exprs.
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct Predicate {
|
||||
|
||||
Reference in New Issue
Block a user