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

Function fixed_len_byte_array_to_string

datafusion-cli/src/functions.rs:313–319  ·  view source on GitHub ↗

Convert to a string if it has utf8 encoding, otherwise print bytes directly

(val: Option<&FixedLenByteArray>)

Source from the content-addressed store, hash-verified

311
312/// Convert to a string if it has utf8 encoding, otherwise print bytes directly
313fn fixed_len_byte_array_to_string(val: Option<&FixedLenByteArray>) -> Option<String> {
314 val.map(|v| {
315 v.as_utf8()
316 .map(|s| s.to_string())
317 .unwrap_or_else(|_e| v.to_string())
318 })
319}
320
321#[derive(Debug)]
322pub struct ParquetMetadataFunc {}

Callers 1

Calls 2

mapMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…