Skip to content

Commit 7f8cf18

Browse files
committed
fix: fix the DisPlay for
Signed-off-by: StandingMan <jmtangcs@gmail.com>
1 parent b4a3189 commit 7f8cf18

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

datafusion/expr/src/expr.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,10 +1402,14 @@ pub struct PlannedReplaceSelectItem {
14021402

14031403
impl Display for PlannedReplaceSelectItem {
14041404
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
1405-
write!(f, "REPLACE")?;
1406-
for item in &self.items {
1407-
write!(f, " ({item})")?;
1405+
write!(f, "REPLACE (")?;
1406+
for (i, item) in self.items.iter().enumerate() {
1407+
if i > 0 {
1408+
write!(f, ", ")?;
1409+
}
1410+
write!(f, "{item}")?;
14081411
}
1412+
write!(f, ")")?;
14091413
Ok(())
14101414
}
14111415
}

datafusion/sql/src/statement.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,8 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
12961296
let function_body = match function_body {
12971297
Some(r) => Some(self.sql_to_expr(
12981298
match r {
1299-
ast::CreateFunctionBody::AsBeforeOptions{body: expr, ..} => expr,
1299+
// `link_symbol` indicates if the primary expression contains the name of shared library file.
1300+
ast::CreateFunctionBody::AsBeforeOptions{body: expr, link_symbol: _link_symbol} => expr,
13001301
ast::CreateFunctionBody::AsAfterOptions(expr) => expr,
13011302
ast::CreateFunctionBody::Return(expr) => expr,
13021303
ast::CreateFunctionBody::AsBeginEnd(_) => {

0 commit comments

Comments
 (0)