Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
ecd240a
updating submodule
vibhatha Mar 4, 2022
fb5b46f
temp commit to remove files in submodule
vibhatha Mar 19, 2022
a57040a
adding submodule
vibhatha Mar 19, 2022
61ed8ef
updating testing submodule
vibhatha Mar 20, 2022
3f85bf0
revert to uupstream version
vibhatha Mar 20, 2022
92bc822
rebase
vibhatha Mar 18, 2022
c319d2a
updating the engine substrait exammple
vibhatha Mar 19, 2022
dae4c0c
rebase
vibhatha Mar 22, 2022
9a53285
updating cmakelist
vibhatha Mar 22, 2022
91929f7
removing parquet dep
vibhatha Mar 22, 2022
a45b25c
adding substrait test cases and refactor
vibhatha Mar 23, 2022
b3edec2
rebase
vibhatha Mar 23, 2022
cfe821c
rebase continue
vibhatha Mar 23, 2022
f16ee61
updating example
vibhatha Mar 23, 2022
517014e
rebase
vibhatha Mar 23, 2022
005823b
rebase
vibhatha Mar 24, 2022
8f4d913
adding engine
vibhatha Mar 24, 2022
07cb5d2
functional init version of python substrait
vibhatha Mar 24, 2022
c359a1d
rebase
vibhatha Mar 24, 2022
0be4d6f
minor modification to cmakelist
vibhatha Mar 24, 2022
ef3f5d0
adding class import
vibhatha Mar 24, 2022
a2ae427
addressing python review comments
vibhatha Mar 25, 2022
d15b7b4
rebase
vibhatha Mar 25, 2022
2ab7231
addressing reviews
vibhatha Apr 7, 2022
373e817
rebase
vibhatha Apr 8, 2022
ddf568d
removing examples
vibhatha Apr 8, 2022
a6f5683
rebase
vibhatha Apr 8, 2022
52fa437
adding pymarktest
vibhatha Apr 8, 2022
7c47d08
rebase
vibhatha Apr 10, 2022
b80ff39
rebase
vibhatha Apr 10, 2022
fb552b4
update test cases
vibhatha Apr 10, 2022
376a40d
addressing reviews
vibhatha Apr 10, 2022
b02ff32
adding test cases for invalid plan
vibhatha Apr 11, 2022
0239ecc
temp commit to test AppVeyor
vibhatha Apr 18, 2022
3814334
excluding redundant test
vibhatha Apr 18, 2022
f4c2581
updating test case
vibhatha Apr 18, 2022
e4b6daa
test fpath
vibhatha Apr 18, 2022
0cea68d
updating workflow
vibhatha Apr 18, 2022
06f7bad
adding engine flag for python build script
vibhatha Apr 18, 2022
80c1bb2
rebase
vibhatha Apr 21, 2022
39c3f3e
updating conftest for engine addition
vibhatha Apr 26, 2022
48051ce
updating test cases and imports
vibhatha Apr 26, 2022
c2e9092
adding missing imports
vibhatha Apr 26, 2022
e643c3e
refactor the usage
vibhatha Apr 26, 2022
b3a80c6
refactor from engine to substrait and rebase
vibhatha Apr 26, 2022
222cacb
fix import
vibhatha Apr 26, 2022
7c861cb
minor changes
vibhatha Apr 28, 2022
ee73c40
rebase
vibhatha Apr 28, 2022
256f514
testing windows ci issue
vibhatha Apr 28, 2022
e3ed91d
testing path
vibhatha Apr 28, 2022
ffcf567
updating the test case skipping windows
vibhatha Apr 28, 2022
db5dba1
remove unnecessary imports and adding skip for windows
vibhatha Apr 28, 2022
717de20
addressing feedbacks
vibhatha Apr 28, 2022
b3a36ad
fix the commit order and formatting in pytest
vibhatha Apr 28, 2022
1809932
removed the export keyword
vibhatha Apr 28, 2022
f40c2cf
updating test condition
vibhatha Apr 30, 2022
749be1b
adding comment for test
vibhatha Apr 30, 2022
3d808cf
update libarrow.pxd
vibhatha May 3, 2022
3b0da1f
rebase
vibhatha May 3, 2022
d660960
changing the buffer usage in the substrait consumer
vibhatha May 6, 2022
7739b08
adding a comment on context usage
vibhatha May 6, 2022
9e19335
addressing reviews p1
vibhatha May 10, 2022
ffc87ea
change order
vibhatha May 10, 2022
784c07b
replace parquest tests with arrow ipc
vibhatha May 10, 2022
83b6602
updating namespace
vibhatha May 12, 2022
0a377ea
type_internal: substrait namespace modification (fix amd ci failure)
vibhatha May 13, 2022
b6045da
fix style issue
vibhatha May 13, 2022
fc0772c
addressing review comments
vibhatha May 17, 2022
f259e7b
removing comments and formatting
vibhatha May 17, 2022
1e21a0b
move libarrow_substrait and minor refactor
vibhatha May 20, 2022
ce2834a
refactor substrait consumer
vibhatha May 20, 2022
167e8aa
todo docs added
vibhatha May 20, 2022
00cc8d3
reverting the change
vibhatha May 20, 2022
af47f03
fix build break
vibhatha May 20, 2022
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
1 change: 1 addition & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ jobs:
ARROW_PLASMA: ON
ARROW_PYTHON: ON
ARROW_S3: ON
ARROW_SUBSTRAIT: ON
ARROW_WITH_ZLIB: ON
ARROW_WITH_LZ4: ON
ARROW_WITH_BZ2: ON
Expand Down
1 change: 1 addition & 0 deletions ci/scripts/python_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export PYARROW_WITH_PLASMA=${ARROW_PLASMA:-OFF}
export PYARROW_WITH_PARQUET=${ARROW_PARQUET:-OFF}
export PYARROW_WITH_PARQUET_ENCRYPTION=${PARQUET_REQUIRE_ENCRYPTION:-ON}
export PYARROW_WITH_S3=${ARROW_S3:-OFF}
export PYARROW_WITH_SUBSTRAIT=${ARROW_SUBSTRAIT:-OFF}

export PYARROW_PARALLEL=${n_jobs}

Expand Down
3 changes: 2 additions & 1 deletion cpp/src/arrow/engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ set(ARROW_SUBSTRAIT_SRCS
substrait/serde.cc
substrait/plan_internal.cc
substrait/relation_internal.cc
substrait/type_internal.cc)
substrait/type_internal.cc
substrait/util.cc)

add_arrow_lib(arrow_substrait
CMAKE_PACKAGE_NAME
Expand Down
62 changes: 62 additions & 0 deletions cpp/src/arrow/engine/substrait/serde_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// under the License.

#include "arrow/engine/substrait/serde.h"
#include "arrow/engine/substrait/util.h"

#include <google/protobuf/descriptor.h>
#include <google/protobuf/util/json_util.h>
Expand Down Expand Up @@ -752,5 +753,66 @@ TEST(Substrait, ExtensionSetFromPlanMissingFunc) {
&ext_set));
}

Result<std::string> GetSubstraitJSON() {
ARROW_ASSIGN_OR_RAISE(std::string dir_string,
arrow::internal::GetEnvVar("PARQUET_TEST_DATA"));
auto file_name =
arrow::internal::PlatformFilename::FromString(dir_string)->Join("binary.parquet");
auto file_path = file_name->ToString();
std::string substrait_json = R"({
"relations": [
{"rel": {
"read": {
"base_schema": {
"struct": {
"types": [
{"binary": {}}
]
},
"names": [
"foo"
]
},
"local_files": {
"items": [
{
"uri_file": "file://FILENAME_PLACEHOLDER",
"format": "FILE_FORMAT_PARQUET"
}
]
}
}
}}
]
})";
std::string filename_placeholder = "FILENAME_PLACEHOLDER";
substrait_json.replace(substrait_json.find(filename_placeholder),
filename_placeholder.size(), file_path);
return substrait_json;
}

TEST(Substrait, GetRecordBatchReader) {
#ifdef _WIN32
GTEST_SKIP() << "ARROW-16392: Substrait File URI not supported for Windows";
#else
ASSERT_OK_AND_ASSIGN(std::string substrait_json, GetSubstraitJSON());
ASSERT_OK_AND_ASSIGN(auto buf, substrait::SerializeJsonPlan(substrait_json));
ASSERT_OK_AND_ASSIGN(auto reader, substrait::ExecuteSerializedPlan(*buf));
ASSERT_OK_AND_ASSIGN(auto table, Table::FromRecordBatchReader(reader.get()));
// Note: assuming the binary.parquet file contains fixed amount of records
// in case of a test failure, re-evalaute the content in the file
EXPECT_EQ(table->num_rows(), 12);
#endif
}

TEST(Substrait, InvalidPlan) {
std::string substrait_json = R"({
"relations": [
]
})";
ASSERT_OK_AND_ASSIGN(auto buf, substrait::SerializeJsonPlan(substrait_json));
ASSERT_RAISES(Invalid, substrait::ExecuteSerializedPlan(*buf));
}

} // namespace engine
} // namespace arrow
Loading