File tree Expand file tree Collapse file tree
asap-common/dependencies/rs/elastic_dsl_utilities/src/ast_parsing Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,22 +214,17 @@ fn infer_time_field(predicates: &[Predicate]) -> FieldName {
214214 let bound_is_time_like = gte. iter ( ) . chain ( lte. iter ( ) ) . any ( |term| {
215215 matches ! ( term, TermValue :: String ( value) if TimeRange :: parse_date_math( value. as_str( ) , 0 ) . is_some( ) )
216216 } ) ;
217- let looks_like_time_field =
218- ( field == "@timestamp" || field == "timestamp" || field. ends_with ( "_time" ) )
219- && bound_is_time_like;
217+ let looks_like_time_field = field == "@timestamp"
218+ || field == "timestamp"
219+ || field. ends_with ( "_time" )
220+ || bound_is_time_like;
220221
221222 if looks_like_time_field {
222223 return field. clone ( ) ;
223224 }
224225 }
225226 }
226227
227- for predicate in predicates {
228- if let Predicate :: Range { field, .. } = predicate {
229- return field. clone ( ) ;
230- }
231- }
232-
233228 "@timestamp" . to_string ( )
234229}
235230
You can’t perform that action at this time.
0 commit comments