-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-39720: [Swift] Switch reader to use arrow field instead of proto for building arrays #39721
Conversation
|
d95dbdf
to
718e1c1
Compare
@@ -165,6 +167,48 @@ public class ArrowType { | |||
return ArrowType.ArrowUnknown | |||
} | |||
} | |||
|
|||
public static func getStride( // swiftlint:disable:this cyclomatic_complexity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about making this a normal func (instance method) not a static func?
nullCount: nullCount, stride: MemoryLayout<Int8>.stride) | ||
let arrowType = ArrowType(ArrowType.ArrowBinary) | ||
let arrowData = try ArrowData(arrowType, buffers: buffers, | ||
nullCount: nullCount, stride: ArrowType.getStride(arrowType)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about computing stride:
in ArrowData.init()
because ArrowData.init()
can use the given ArrowType
?
@kou I hope all is well. Please review again when you get a chance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 21ffd82. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 35 possible false positives for unstable benchmarks that are known to sometimes produce them. |
…roto for building arrays (apache#39721) This PR updates the ArrowReaderHelper to use an ArrowField object for building an Array instead of a protobuf field obj. This removes leveraging protobuf from building out the Arrays and makes the code easier to reuse (like for the C Data Interface) * Closes: apache#39720 Authored-by: Alva Bandy <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
…roto for building arrays (apache#39721) This PR updates the ArrowReaderHelper to use an ArrowField object for building an Array instead of a protobuf field obj. This removes leveraging protobuf from building out the Arrays and makes the code easier to reuse (like for the C Data Interface) * Closes: apache#39720 Authored-by: Alva Bandy <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
…roto for building arrays (apache#39721) This PR updates the ArrowReaderHelper to use an ArrowField object for building an Array instead of a protobuf field obj. This removes leveraging protobuf from building out the Arrays and makes the code easier to reuse (like for the C Data Interface) * Closes: apache#39720 Authored-by: Alva Bandy <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
This PR updates the ArrowReaderHelper to use an ArrowField object for building an Array instead of a protobuf field obj. This removes leveraging protobuf from building out the Arrays and makes the code easier to reuse (like for the C Data Interface)