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

Function value_to_string

datafusion/sql/src/utils.rs:327–352  ·  view source on GitHub ↗
(value: &Value)

Source from the content-addressed store, hash-verified

325}
326
327pub(crate) fn value_to_string(value: &Value) -> Option<String> {
328 match value {
329 Value::SingleQuotedString(s) => Some(s.to_string()),
330 Value::DollarQuotedString(s) => Some(s.to_string()),
331 Value::Number(_, _) | Value::Boolean(_) => Some(value.to_string()),
332 Value::UnicodeStringLiteral(s) => Some(s.to_string()),
333 Value::EscapedStringLiteral(s) => Some(s.to_string()),
334 Value::QuoteDelimitedStringLiteral(s)
335 | Value::NationalQuoteDelimitedStringLiteral(s) => Some(s.value.to_string()),
336 Value::DoubleQuotedString(_)
337 | Value::NationalStringLiteral(_)
338 | Value::SingleQuotedByteStringLiteral(_)
339 | Value::DoubleQuotedByteStringLiteral(_)
340 | Value::TripleSingleQuotedString(_)
341 | Value::TripleDoubleQuotedString(_)
342 | Value::TripleSingleQuotedByteStringLiteral(_)
343 | Value::TripleDoubleQuotedByteStringLiteral(_)
344 | Value::SingleQuotedRawStringLiteral(_)
345 | Value::DoubleQuotedRawStringLiteral(_)
346 | Value::TripleSingleQuotedRawStringLiteral(_)
347 | Value::TripleDoubleQuotedRawStringLiteral(_)
348 | Value::HexStringLiteral(_)
349 | Value::Null
350 | Value::Placeholder(_) => None,
351 }
352}
353
354pub(crate) fn rewrite_recursive_unnests_bottom_up(
355 input: &LogicalPlan,

Callers 2

parse_options_mapMethod · 0.85
set_statement_to_planMethod · 0.85

Calls 1

to_stringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…