alamb commented on code in PR #3450:
URL: https://github.com/apache/arrow-datafusion/pull/3450#discussion_r968397163


##########
datafusion/physical-expr/src/expressions/in_list.rs:
##########
@@ -1659,4 +1754,105 @@ mod tests {
 
         Ok(())
     }
+
+    #[test]
+    fn in_list_set_timestamp() -> Result<()> {
+        let schema = Schema::new(vec![Field::new(
+            "a",
+            DataType::Timestamp(TimeUnit::Microsecond, None),
+            true,
+        )]);
+        let a = TimestampMicrosecondArray::from(vec![
+            Some(1388588401000000000),
+            Some(1288588501000000000),
+            None,
+        ]);
+        let col_a = col("a", &schema)?;
+        let batch = RecordBatch::try_new(Arc::new(schema.clone()), 
vec![Arc::new(a)])?;
+
+        let mut list = vec![
+            lit(ScalarValue::TimestampMicrosecond(
+                Some(1388588401000000000),
+                None,
+            )),
+            lit(ScalarValue::TimestampMicrosecond(None, None)),
+            lit(ScalarValue::TimestampMicrosecond(
+                Some(1388588401000000001),
+                None,
+            )),
+        ];
+        for v in 1388588401000000001..(OPTIMIZER_INSET_THRESHOLD + 4) {

Review Comment:
   Does this loop have any values?
   
   I would have expected the loop to go to a value higher than the starting 
`1388588401000000001`
   
   ```suggestion
           let start_ts = 1388588401000000001;
           for v in start_ts..(start_ts + OPTIMIZER_INSET_THRESHOLD + 4) {
   ```



-- 
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]

Reply via email to