We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
GetFieldFunc
,
1 parent 274cdba commit 5c370faCopy full SHA for 5c370fa
datafusion/functions/src/core/getfield.rs
@@ -108,8 +108,8 @@ impl ScalarUDFImpl for GetFieldFunc {
108
let [base, field_name] = take_function_args(self.name(), args)?;
109
110
let name = match field_name {
111
- Expr::Literal(name, _) => name,
112
- other => &ScalarValue::Utf8(Some(other.schema_name().to_string())),
+ Expr::Literal(name, _) => name.to_string(),
+ other => other.schema_name().to_string(),
113
};
114
115
Ok(format!("{base}[{name}]"))
@@ -118,8 +118,8 @@ impl ScalarUDFImpl for GetFieldFunc {
118
fn schema_name(&self, args: &[Expr]) -> Result<String> {
119
120
121
122
123
124
125
Ok(format!("{}[{}]", base.schema_name(), name))
0 commit comments