Skip to content

Commit efe21f0

Browse files
committed
Enforce unique names for is_set columns on first_value and last_value
1 parent 868c455 commit efe21f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

datafusion/functions-aggregate/src/first_last.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ impl AggregateUDFImpl for FirstValue {
166166
)
167167
.into()];
168168
fields.extend(args.ordering_fields.iter().cloned());
169-
fields.push(Field::new("is_set", DataType::Boolean, true).into());
169+
fields.push(Field::new(format_state_name(args.name, "first_value_is_set"), DataType::Boolean, true).into());
170170
Ok(fields)
171171
}
172172

@@ -1087,7 +1087,7 @@ impl AggregateUDFImpl for LastValue {
10871087
)
10881088
.into()];
10891089
fields.extend(args.ordering_fields.iter().cloned());
1090-
fields.push(Field::new("is_set", DataType::Boolean, true).into());
1090+
fields.push(Field::new(format_state_name(args.name, "last_value_is_set"), DataType::Boolean, true).into());
10911091
Ok(fields)
10921092
}
10931093

0 commit comments

Comments
 (0)