Skip to content

Commit acec3cc

Browse files
committed
fix: return value of pg_user_getbyid
1 parent 179c489 commit acec3cc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

datafusion-postgres/src/pg_catalog.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,11 +1788,14 @@ pub fn create_pg_get_userbyid_udf() -> ScalarUDF {
17881788
// Define the function implementation
17891789
let func = move |args: &[ColumnarValue]| {
17901790
let args = ColumnarValue::values_to_arrays(args)?;
1791-
let _input = &args[0]; // User OID, but we'll ignore for now
1791+
let input = &args[0]; // User OID, but we'll ignore for now
17921792

17931793
// Create a UTF8 array with default user name
17941794
let mut builder = StringBuilder::new();
1795-
builder.append_value("postgres");
1795+
for _ in 0..input.len() {
1796+
builder.append_value("postgres");
1797+
}
1798+
17961799
let array: ArrayRef = Arc::new(builder.finish());
17971800

17981801
Ok(ColumnarValue::Array(array))

0 commit comments

Comments
 (0)