chore: add u64 for EqualValue and set expr is true when filter is empty (#6731)

* chore: add u64 for EqualValue and set expr is true when filter is empty

* Update src/log-query/src/log_query.rs

Co-authored-by: Yingwen <realevenyag@gmail.com>

* chore: update EqualValue Uinit to UInt

---------

Co-authored-by: Yingwen <realevenyag@gmail.com>
This commit is contained in:
localhost
2025-08-13 16:25:33 +08:00
committed by GitHub
parent ccccaf7734
commit a678b4dfd6
2 changed files with 10 additions and 1 deletions

View File

@@ -336,6 +336,8 @@ pub enum EqualValue {
Boolean(bool),
/// Exact match with a number value.
Int(i64),
/// Exact match with an unsigned integer value.
UInt(u64),
/// Exact match with a float value.
Float(f64),
}
@@ -364,6 +366,12 @@ impl From<f64> for EqualValue {
}
}
impl From<u64> for EqualValue {
fn from(value: u64) -> Self {
EqualValue::UInt(value)
}
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub enum ContentFilter {
// Search-based filters

View File

@@ -201,7 +201,7 @@ impl LogQueryPlanner {
.try_collect::<Vec<_>>()?;
if filter_exprs.is_empty() {
return Ok(None);
return Ok(Some(col_expr.is_true()));
}
// Combine all filters with AND logic
@@ -475,6 +475,7 @@ impl LogQueryPlanner {
EqualValue::Float(n) => lit(ScalarValue::Float64(Some(n))),
EqualValue::Int(n) => lit(ScalarValue::Int64(Some(n))),
EqualValue::Boolean(b) => lit(ScalarValue::Boolean(Some(b))),
EqualValue::UInt(n) => lit(ScalarValue::UInt64(Some(n))),
}
}