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

Function unpack_string

datafusion/pruning/src/pruning_predicate.rs:1807–1809  ·  view source on GitHub ↗

returns the string literal of the scalar value if it is a string

(s: &ScalarValue)

Source from the content-addressed store, hash-verified

1805
1806/// returns the string literal of the scalar value if it is a string
1807fn unpack_string(s: &ScalarValue) -> Option<&str> {
1808 s.try_as_str().flatten()
1809}
1810
1811fn extract_string_literal(expr: &Arc<dyn PhysicalExpr>) -> Option<&str> {
1812 if let Some(lit) = expr.downcast_ref::<phys_expr::Literal>() {

Callers 1

extract_string_literalFunction · 0.85

Calls 2

flattenMethod · 0.80
try_as_strMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…