Skip to content

Commit

Permalink
updated arrow version to 7.0.0 (#1677)
Browse files Browse the repository at this point in the history
* updated arrow version to 7.0.0

* Update arrow_dataset_ops.cc

Co-authored-by: Yong Tang <[email protected]>
  • Loading branch information
LinGeLin and yongtang authored May 12, 2022
1 parent 5360168 commit eddae8c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 18 deletions.
19 changes: 7 additions & 12 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,11 @@ http_archive(
http_archive(
name = "arrow",
build_file = "//third_party:arrow.BUILD",
patch_cmds = [
# TODO: Remove the fowllowing once arrow issue is resolved.
"""sed -i.bak 's/type_traits/std::max<int16_t>(sizeof(int16_t), type_traits/g' cpp/src/parquet/column_reader.cc""",
"""sed -i.bak 's/value_byte_size/value_byte_size)/g' cpp/src/parquet/column_reader.cc""",
],
sha256 = "a27971e2a71c412ae43d998b7b6d06201c7a3da382c804dcdc4a8126ccbabe67",
strip_prefix = "arrow-apache-arrow-4.0.0",
sha256 = "57e13c62f27b710e1de54fd30faed612aefa22aa41fa2c0c3bacd204dd18a8f3",
strip_prefix = "arrow-apache-arrow-7.0.0",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/apache/arrow/archive/apache-arrow-4.0.0.tar.gz",
"https://github.com/apache/arrow/archive/apache-arrow-4.0.0.tar.gz",
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/apache/arrow/archive/apache-arrow-7.0.0.tar.gz",
"https://github.com/apache/arrow/archive/apache-arrow-7.0.0.tar.gz",
],
)

Expand Down Expand Up @@ -851,10 +846,10 @@ http_archive(
http_archive(
name = "xsimd",
build_file = "//third_party:xsimd.BUILD",
sha256 = "45337317c7f238fe0d64bb5d5418d264a427efc53400ddf8e6a964b6bcb31ce9",
strip_prefix = "xsimd-7.5.0",
sha256 = "21b4700e9ef70f6c9a86952047efd8272317df4e6fee35963de9394fd9c5677f",
strip_prefix = "xsimd-8.0.1",
urls = [
"https://github.com/xtensor-stack/xsimd/archive/refs/tags/7.5.0.tar.gz",
"https://github.com/xtensor-stack/xsimd/archive/refs/tags/8.0.1.tar.gz",
],
)

Expand Down
2 changes: 1 addition & 1 deletion tensorflow_io/core/kernels/arrow/arrow_dataset_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ limitations under the License.
==============================================================================*/

#include "arrow/api.h"
#include "arrow/io/stdio.h"
#include "arrow/ipc/api.h"
#include "arrow/result.h"
#include "arrow/util/io_util.h"
#include "tensorflow/core/framework/dataset.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/public/version.h"
Expand Down
14 changes: 9 additions & 5 deletions tensorflow_io/core/kernels/json_kernels.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,20 @@ class JSONReadable : public IOReadableInterface {

::arrow::Status status;

status = ::arrow::json::TableReader::Make(
auto reader_result = ::arrow::json::TableReader::Make(
::arrow::default_memory_pool(), json_file_,
::arrow::json::ReadOptions::Defaults(),
::arrow::json::ParseOptions::Defaults(), &reader_);
if (!status.ok()) {
::arrow::json::ParseOptions::Defaults());
if (!reader_result.ok()) {
return errors::InvalidArgument("unable to make a TableReader: ", status);
} else {
reader_ = reader_result.ValueOrDie();
}
status = reader_->Read(&table_);
if (!status.ok()) {
auto table_result = reader_->Read();
if (!table_result.ok()) {
return errors::InvalidArgument("unable to read table: ", status);
} else {
table_ = table_result.ValueOrDie();
}

shapes_.clear();
Expand Down
2 changes: 2 additions & 0 deletions third_party/arrow.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ cc_library(
"cpp/src/**/stream_to_file.cc",
"cpp/src/arrow/util/bpacking_avx2.cc",
"cpp/src/arrow/util/bpacking_avx512.cc",
"cpp/src/arrow/util/bpacking_neon.cc",
"cpp/src/arrow/util/tracing_internal.cc",
],
),
hdrs = [
Expand Down
2 changes: 2 additions & 0 deletions third_party/xsimd.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ cc_library(
hdrs = glob(
[
"include/xsimd/*.hpp",
"include/xsimd/arch/*.hpp",
"include/xsimd/arch/generic/*.hpp",
"include/xsimd/config/*.hpp",
"include/xsimd/math/*.hpp",
"include/xsimd/memory/*.hpp",
Expand Down

0 comments on commit eddae8c

Please sign in to comment.