MCPcopy Create free account
hub / github.com/apache/datafusion / test_spark_hex_int64

Function test_spark_hex_int64

datafusion/spark/src/function/math/hex.rs:529–548  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

527
528 #[test]
529 fn test_spark_hex_int64() {
530 let int_array = Int64Array::from(vec![Some(1), Some(2), None, Some(3)]);
531 let columnar_value = ColumnarValue::Array(Arc::new(int_array));
532
533 let result = super::spark_hex(&[columnar_value]).unwrap();
534 let result = match result {
535 ColumnarValue::Array(array) => array,
536 _ => panic!("Expected array"),
537 };
538
539 let string_array = as_string_array(&result);
540 let expected_array = StringArray::from(vec![
541 Some("1".to_string()),
542 Some("2".to_string()),
543 None,
544 Some("3".to_string()),
545 ]);
546
547 assert_eq!(string_array, &expected_array);
548 }
549
550 #[test]
551 fn test_dict_values_null() {

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
spark_hexFunction · 0.85
as_string_arrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…