Jefffrey commented on code in PR #18915:
URL: https://github.com/apache/datafusion/pull/18915#discussion_r2560011376


##########
datafusion/common/src/scalar/mod.rs:
##########
@@ -3718,10 +3722,9 @@ impl ScalarValue {
     ) -> Result<Self> {
         let source_type = self.data_type();
         if let Some(multiplier) = date_to_timestamp_multiplier(&source_type, 
target_type)
+            && let Some(value) = self.date_scalar_value_as_i64()
         {
-            if let Some(value) = self.date_scalar_value_as_i64() {
-                ensure_timestamp_in_bounds(value, multiplier, &source_type, 
target_type)?;
-            }
+            ensure_timestamp_in_bounds(value, multiplier, &source_type, 
target_type)?;

Review Comment:
   🥳 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to