-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GraphAr] Align the vertices of fragment to vertex chunk size & Fix t…
…he shuffle array multi-thread bug & Bump up GraphAr (#1604) - Align the vertices of fragment to vertex chunk size by append nulls, so the multi-fragment writer out to gar format also correct - Fix the gar loader shuffle oid array bug: remove the multi-thread implementation since that shuffle already use thread to send/recv, that would make message conflict - Bump up GraphAr to support build with local installed arrow. Fixes #issue number
- Loading branch information
Showing
10 changed files
with
180 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** Copyright 2020-2023 Alibaba Group Holding Limited. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
#ifdef ENABLE_GAR | ||
|
||
#include "graph/loader/gar_fragment_loader.h" | ||
|
||
#include "arrow/api.h" | ||
#include "gar/graph_info.h" | ||
|
||
namespace vineyard { | ||
|
||
std::shared_ptr<arrow::Schema> ConstructSchemaFromPropertyGroup( | ||
const GraphArchive::PropertyGroup& property_group) { | ||
std::vector<std::shared_ptr<arrow::Field>> fields; | ||
for (const auto& prop : property_group.GetProperties()) { | ||
fields.emplace_back(arrow::field( | ||
prop.name, GraphArchive::DataType::DataTypeToArrowDataType(prop.type))); | ||
} | ||
return arrow::schema(fields); | ||
} | ||
|
||
} // namespace vineyard | ||
|
||
#endif // ENABLE_GAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule GraphAr
updated
from bccd59 to c6b689
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** Copyright 2020-2023 Alibaba Group Holding Limited. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
#ifdef ENABLE_GAR | ||
|
||
#include "graph/writer/arrow_fragment_writer_impl.h" | ||
|
||
namespace vineyard { | ||
|
||
template class ArrowFragmentWriter<ArrowFragment<std::string, uint64_t>>; | ||
|
||
} // namespace vineyard | ||
|
||
#endif // ENABLE_GA |