kiszk commented on a change in pull request #7507:
URL: https://github.com/apache/arrow/pull/7507#discussion_r465505197
##########
File path: cpp/src/arrow/ipc/reader.cc
##########
@@ -449,7 +449,7 @@ Result<std::shared_ptr<RecordBatch>> LoadRecordBatchSubset(
const flatbuf::RecordBatch* metadata, const std::shared_ptr<Schema>&
schema,
const std::vector<bool>& inclusion_mask, const DictionaryMemo*
dictionary_memo,
const IpcReadOptions& options, MetadataVersion metadata_version,
- Compression::type compression, io::RandomAccessFile* file) {
+ Compression::type compression, io::RandomAccessFile* file, bool
swap_endian = false) {
Review comment:
I think we need to keep `swap_endian` and `swap_endian_`.
IMHO, this is because `IpcReadOptions::use_native_endian` is a flag set by a
user to determine whether the endianness of the schema will be changed or not
if the endianness of the schema is not equal to the platform-native endianness.
`swap_endian_` is to show we need to actually swap endianness of each
element.
For example, there is a case that `IpcReadOptions::use_native_endian=true`
and `swap_endian_=false` if x86 platform gets the schema with the endianness =
LITTLE.
Or, can we use `IpcReadOptions::use_native_endian` as a working area to show
we need to actually swap endianness of each element?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]