Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions datafusion/common/src/scalar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2764,8 +2764,10 @@ impl ScalarValue {
Ok(scalars)
}

// TODO: Support more types after other ScalarValue is wrapped with ArrayRef
/// Get raw data (inner array) inside ScalarValue
#[deprecated(
since = "46.0.0",
note = "This function is obsolete. Use `to_array` instead"
)]
pub fn raw_data(&self) -> Result<ArrayRef> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much @qazxcdswe123 -- this is a nice find.

Per https://datafusion.apache.org/contributor-guide/api-health.html instead of removing this function, can you please mark it as #[deprecated] instead?

Maybe it would be a good time to go remove any deprecated functions from 41 or earlier 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the remind!

And I think to_array is what we meant to do here?

pub fn to_array(&self) -> Result<ArrayRef> {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll file another PR to cleanup some old deprecation

match self {
ScalarValue::List(arr) => Ok(arr.to_owned()),
Expand Down