Skip to content
Closed
Show file tree
Hide file tree
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
31 changes: 17 additions & 14 deletions rust/datafusion/src/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,20 +163,23 @@ impl ScalarValue {

/// whether this value is null or not.
pub fn is_null(&self) -> bool {
matches!(*self, ScalarValue::Boolean(None)
| ScalarValue::UInt8(None)
| ScalarValue::UInt16(None)
| ScalarValue::UInt32(None)
| ScalarValue::UInt64(None)
| ScalarValue::Int8(None)
| ScalarValue::Int16(None)
| ScalarValue::Int32(None)
| ScalarValue::Int64(None)
| ScalarValue::Float32(None)
| ScalarValue::Float64(None)
| ScalarValue::Utf8(None)
| ScalarValue::LargeUtf8(None)
| ScalarValue::List(None, _))
matches!(
*self,
ScalarValue::Boolean(None)
| ScalarValue::UInt8(None)
| ScalarValue::UInt16(None)
| ScalarValue::UInt32(None)
| ScalarValue::UInt64(None)
| ScalarValue::Int8(None)
| ScalarValue::Int16(None)
| ScalarValue::Int32(None)
| ScalarValue::Int64(None)
| ScalarValue::Float32(None)
| ScalarValue::Float64(None)
| ScalarValue::Utf8(None)
| ScalarValue::LargeUtf8(None)
| ScalarValue::List(None, _)
)
}

/// Converts a scalar value into an 1-row array.
Expand Down
5 changes: 4 additions & 1 deletion rust/parquet/src/record/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,10 @@ impl Field {

/// Determines if this Row represents a primitive value.
pub fn is_primitive(&self) -> bool {
!matches!(*self, Field::Group(_) | Field::ListInternal(_) | Field::MapInternal(_))
!matches!(
*self,
Field::Group(_) | Field::ListInternal(_) | Field::MapInternal(_)
)
}

/// Converts Parquet BOOLEAN type with logical type into `bool` value.
Expand Down
6 changes: 3 additions & 3 deletions rust/rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
max_width = 90

# ignore generated files
ignore = [
"arrow/src/ipc/gen",
]
# ignore = [
# "arrow/src/ipc/gen",
#]