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

Function extract_string_literal

datafusion/pruning/src/pruning_predicate.rs:1811–1817  ·  view source on GitHub ↗
(expr: &Arc<dyn PhysicalExpr>)

Source from the content-addressed store, hash-verified

1809}
1810
1811fn extract_string_literal(expr: &Arc<dyn PhysicalExpr>) -> Option<&str> {
1812 if let Some(lit) = expr.downcast_ref::<phys_expr::Literal>() {
1813 let s = unpack_string(lit.value())?;
1814 return Some(s);
1815 }
1816 None
1817}
1818
1819/// Convert `column LIKE literal` where P is a constant prefix of the literal
1820/// to a range check on the column: `P <= column && column < P'`, where P' is the

Callers 2

build_like_matchFunction · 0.85
build_not_like_matchFunction · 0.85

Calls 2

unpack_stringFunction · 0.85
valueMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…