timsaucer commented on code in PR #18950:
URL: https://github.com/apache/datafusion/pull/18950#discussion_r2608304739


##########
datafusion/functions/src/encoding/inner.rs:
##########
@@ -553,3 +574,29 @@ fn decode(args: &[ColumnarValue]) -> Result<ColumnarValue> 
{
     }?;
     decode_process(expression, encoding)
 }
+
+#[cfg(test)]
+mod tests {
+    #[test]
+    fn test_encode_fsb() {
+        use super::*;
+
+        let value = vec![0u8; 16];
+        let array = 
arrow::array::FixedSizeBinaryArray::try_from_sparse_iter_with_size(
+            vec![Some(value)].into_iter(),
+            16,
+        )
+        .unwrap();
+        let value = ColumnarValue::Array(Arc::new(array));
+
+        let ColumnarValue::Array(result) =
+            encode_process(&value, Encoding::Base64).unwrap()
+        else {
+            panic!("unexpected value");
+        };
+
+        let string_array = 
result.as_any().downcast_ref::<StringArray>().unwrap();
+        let result_value = string_array.value(0);
+        assert_eq!(result_value, "AAAAAAAAAAAAAAAAAAAAAA");
+    }
+}

Review Comment:
   ```suggestion
   ```
   
   Ok to remove now that we have SLT.



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