tustvold commented on code in PR #1890:
URL: https://github.com/apache/arrow-rs/pull/1890#discussion_r899429928
##########
arrow/src/record_batch.rs:
##########
@@ -138,6 +138,20 @@ impl RecordBatch {
)
})?;
+ for (c, f) in columns.iter().zip(&schema.fields) {
+ if !f.is_nullable() && c.null_count() > 0 {
+ if f.name().len() == 0 {
Review Comment:
is_empty() is normally preferred
##########
arrow/src/record_batch.rs:
##########
@@ -138,6 +138,20 @@ impl RecordBatch {
)
})?;
+ for (c, f) in columns.iter().zip(&schema.fields) {
+ if !f.is_nullable() && c.null_count() > 0 {
+ if f.name().len() == 0 {
+ // hacky workaround for known issue with dictionary IPC
encoding
+ // https://github.com/apache/arrow-rs/issues/1892
Review Comment:
Personally I'd rather an `if !condition` over an `if else` with an empty if
body
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]