Handle comparing ChronoLocalDateTime and Instants (#12834)
* Handle comparing ChronoLocalDateTime and Instants During fingerprinting, we can end up trying to compare two datatypes that are not comparable - ChronoLocalDateTime and Instant. Coerce the ChronoLocalDateTime to a proper Instant for the comparison to work. When earliest / latest are called, the acc parameter must be coerced to a Temporal object also. Resolves #12311 [ci all] * making ->temporal recursive * Get the timezone in an precedence order When converting a LocalTime for fingerprinting, convert to an Instant using the following precedence order: * report timezone * database timezone * system timezone [ci all] * use UTC for timezones
Showing
- src/metabase/query_processor/timezone.clj 1 addition, 1 deletionsrc/metabase/query_processor/timezone.clj
- src/metabase/sync/analyze/fingerprint/fingerprinters.clj 19 additions, 3 deletionssrc/metabase/sync/analyze/fingerprint/fingerprinters.clj
- test/metabase/sync/analyze/fingerprint/fingerprinters_test.clj 50 additions, 16 deletions...metabase/sync/analyze/fingerprint/fingerprinters_test.clj
Please register or sign in to comment