You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "beliefer (via GitHub)" <gi...@apache.org> on 2025/09/17 12:54:47 UTC
[PR] [DRAFT] Refactor parseScanSplitInfo [incubator-gluten]
beliefer opened a new pull request, #10742:
URL: https://github.com/apache/incubator-gluten/pull/10742
## What changes are proposed in this pull request?
This PR proposes to improve parseScanSplitInfo.
## How was this patch tested?
GA tests.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [GLUTEN-10745][VL] Refactor parseScanSplitInfo for VeloxPlanConverter [incubator-gluten]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #10742:
URL: https://github.com/apache/incubator-gluten/pull/10742#issuecomment-3306972983
ping @Yohahaha cc @jinchengchenghh @zhztheplayer @FelixYBW
--
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.
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [GLUTEN-10745][VL] Refactor parseScanSplitInfo for VeloxPlanConverter [incubator-gluten]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #10742:
URL: https://github.com/apache/incubator-gluten/pull/10742#discussion_r2361555850
##########
cpp/velox/compute/VeloxPlanConverter.cc:
##########
@@ -46,27 +46,31 @@ std::shared_ptr<SplitInfo> parseScanSplitInfo(
using SubstraitFileFormatCase = ::substrait::ReadRel_LocalFiles_FileOrFiles::FileFormatCase;
auto splitInfo = std::make_shared<SplitInfo>();
- splitInfo->paths.reserve(fileList.size());
- splitInfo->starts.reserve(fileList.size());
- splitInfo->lengths.reserve(fileList.size());
- splitInfo->partitionColumns.reserve(fileList.size());
- splitInfo->properties.reserve(fileList.size());
- splitInfo->metadataColumns.reserve(fileList.size());
+ const size_t fileCount = fileList.size();
+
+ splitInfo->paths.reserve(fileCount);
+ splitInfo->starts.reserve(fileCount);
+ splitInfo->lengths.reserve(fileCount);
+ splitInfo->partitionColumns.reserve(fileCount);
+ splitInfo->properties.reserve(fileCount);
+ splitInfo->metadataColumns.reserve(fileCount);
for (const auto& file : fileList) {
// Expect all Partitions share the same index.
splitInfo->partitionIndex = file.partition_index();
std::unordered_map<std::string, std::string> partitionColumnMap;
+ partitionColumnMap.reserve(file.partition_columns_size());
for (const auto& partitionColumn : file.partition_columns()) {
- partitionColumnMap[partitionColumn.key()] = partitionColumn.value();
+ partitionColumnMap.emplace(partitionColumn.key(), partitionColumn.value());
}
- splitInfo->partitionColumns.emplace_back(partitionColumnMap);
+ splitInfo->partitionColumns.emplace_back(std::move(partitionColumnMap));
Review Comment:
`std::move` is safe here even if `partitionColumnMap` is empty.
`emplace_back` could accept the empty `partitionColumnMap`.
The overhead of `std::move` is very small and check if the `partitionColumnMap` isEmpty brings extra overhead.
I will change the code as you said if you insist. :)
--
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.
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [GLUTEN-10745][VL] Refactor parseScanSplitInfo for VeloxPlanConverter [incubator-gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #10742:
URL: https://github.com/apache/incubator-gluten/pull/10742#issuecomment-3483412071
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [GLUTEN-10745][VL] Refactor parseScanSplitInfo for VeloxPlanConverter [incubator-gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #10742: [GLUTEN-10745][VL] Refactor parseScanSplitInfo for VeloxPlanConverter
URL: https://github.com/apache/incubator-gluten/pull/10742
--
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.
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [GLUTEN-10745][VL] Refactor parseScanSplitInfo for VeloxPlanConverter [incubator-gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #10742:
URL: https://github.com/apache/incubator-gluten/pull/10742#issuecomment-3678360904
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [GLUTEN-10745][VL] Refactor parseScanSplitInfo for VeloxPlanConverter [incubator-gluten]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #10742:
URL: https://github.com/apache/incubator-gluten/pull/10742#discussion_r2362276110
##########
cpp/velox/compute/VeloxPlanConverter.cc:
##########
@@ -46,27 +46,31 @@ std::shared_ptr<SplitInfo> parseScanSplitInfo(
using SubstraitFileFormatCase = ::substrait::ReadRel_LocalFiles_FileOrFiles::FileFormatCase;
auto splitInfo = std::make_shared<SplitInfo>();
- splitInfo->paths.reserve(fileList.size());
- splitInfo->starts.reserve(fileList.size());
- splitInfo->lengths.reserve(fileList.size());
- splitInfo->partitionColumns.reserve(fileList.size());
- splitInfo->properties.reserve(fileList.size());
- splitInfo->metadataColumns.reserve(fileList.size());
+ const size_t fileCount = fileList.size();
+
+ splitInfo->paths.reserve(fileCount);
+ splitInfo->starts.reserve(fileCount);
+ splitInfo->lengths.reserve(fileCount);
+ splitInfo->partitionColumns.reserve(fileCount);
+ splitInfo->properties.reserve(fileCount);
+ splitInfo->metadataColumns.reserve(fileCount);
for (const auto& file : fileList) {
// Expect all Partitions share the same index.
splitInfo->partitionIndex = file.partition_index();
std::unordered_map<std::string, std::string> partitionColumnMap;
+ partitionColumnMap.reserve(file.partition_columns_size());
for (const auto& partitionColumn : file.partition_columns()) {
- partitionColumnMap[partitionColumn.key()] = partitionColumn.value();
+ partitionColumnMap.emplace(partitionColumn.key(), partitionColumn.value());
}
- splitInfo->partitionColumns.emplace_back(partitionColumnMap);
+ splitInfo->partitionColumns.emplace_back(std::move(partitionColumnMap));
Review Comment:
What happened if we set the field with empty `partitionColumnMap`?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [GLUTEN-10745][VL] Refactor parseScanSplitInfo for VeloxPlanConverter [incubator-gluten]
Posted by "jinchengchenghh (via GitHub)" <gi...@apache.org>.
jinchengchenghh commented on code in PR #10742:
URL: https://github.com/apache/incubator-gluten/pull/10742#discussion_r2359024407
##########
cpp/velox/compute/VeloxPlanConverter.cc:
##########
@@ -46,27 +46,31 @@ std::shared_ptr<SplitInfo> parseScanSplitInfo(
using SubstraitFileFormatCase = ::substrait::ReadRel_LocalFiles_FileOrFiles::FileFormatCase;
auto splitInfo = std::make_shared<SplitInfo>();
- splitInfo->paths.reserve(fileList.size());
- splitInfo->starts.reserve(fileList.size());
- splitInfo->lengths.reserve(fileList.size());
- splitInfo->partitionColumns.reserve(fileList.size());
- splitInfo->properties.reserve(fileList.size());
- splitInfo->metadataColumns.reserve(fileList.size());
+ const size_t fileCount = fileList.size();
+
+ splitInfo->paths.reserve(fileCount);
+ splitInfo->starts.reserve(fileCount);
+ splitInfo->lengths.reserve(fileCount);
+ splitInfo->partitionColumns.reserve(fileCount);
+ splitInfo->properties.reserve(fileCount);
+ splitInfo->metadataColumns.reserve(fileCount);
for (const auto& file : fileList) {
// Expect all Partitions share the same index.
splitInfo->partitionIndex = file.partition_index();
std::unordered_map<std::string, std::string> partitionColumnMap;
+ partitionColumnMap.reserve(file.partition_columns_size());
for (const auto& partitionColumn : file.partition_columns()) {
- partitionColumnMap[partitionColumn.key()] = partitionColumn.value();
+ partitionColumnMap.emplace(partitionColumn.key(), partitionColumn.value());
}
- splitInfo->partitionColumns.emplace_back(partitionColumnMap);
+ splitInfo->partitionColumns.emplace_back(std::move(partitionColumnMap));
Review Comment:
Please check if the partitionColumnMap isEmpty first
##########
cpp/velox/compute/VeloxPlanConverter.cc:
##########
@@ -46,27 +46,31 @@ std::shared_ptr<SplitInfo> parseScanSplitInfo(
using SubstraitFileFormatCase = ::substrait::ReadRel_LocalFiles_FileOrFiles::FileFormatCase;
auto splitInfo = std::make_shared<SplitInfo>();
- splitInfo->paths.reserve(fileList.size());
- splitInfo->starts.reserve(fileList.size());
- splitInfo->lengths.reserve(fileList.size());
- splitInfo->partitionColumns.reserve(fileList.size());
- splitInfo->properties.reserve(fileList.size());
- splitInfo->metadataColumns.reserve(fileList.size());
+ const size_t fileCount = fileList.size();
+
+ splitInfo->paths.reserve(fileCount);
+ splitInfo->starts.reserve(fileCount);
+ splitInfo->lengths.reserve(fileCount);
+ splitInfo->partitionColumns.reserve(fileCount);
+ splitInfo->properties.reserve(fileCount);
+ splitInfo->metadataColumns.reserve(fileCount);
for (const auto& file : fileList) {
// Expect all Partitions share the same index.
splitInfo->partitionIndex = file.partition_index();
std::unordered_map<std::string, std::string> partitionColumnMap;
+ partitionColumnMap.reserve(file.partition_columns_size());
for (const auto& partitionColumn : file.partition_columns()) {
- partitionColumnMap[partitionColumn.key()] = partitionColumn.value();
+ partitionColumnMap.emplace(partitionColumn.key(), partitionColumn.value());
}
- splitInfo->partitionColumns.emplace_back(partitionColumnMap);
+ splitInfo->partitionColumns.emplace_back(std::move(partitionColumnMap));
std::unordered_map<std::string, std::string> metadataColumnMap;
+ metadataColumnMap.reserve(file.metadata_columns_size());
for (const auto& metadataColumn : file.metadata_columns()) {
- metadataColumnMap[metadataColumn.key()] = metadataColumn.value();
+ metadataColumnMap.emplace(metadataColumn.key(), metadataColumn.value());
}
- splitInfo->metadataColumns.emplace_back(metadataColumnMap);
+ splitInfo->metadataColumns.emplace_back(std::move(metadataColumnMap));
Review Comment:
ditto
--
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.
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [GLUTEN-10745][VL] Refactor parseScanSplitInfo for VeloxPlanConverter [incubator-gluten]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #10742:
URL: https://github.com/apache/incubator-gluten/pull/10742#issuecomment-3483480917
GA, please hold this PR.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [GLUTEN-10745][VL] Refactor parseScanSplitInfo for VeloxPlanConverter [incubator-gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #10742:
URL: https://github.com/apache/incubator-gluten/pull/10742#issuecomment-3903031391
This PR was auto-closed because it has been stalled for 10 days with no activity. Please feel free to reopen if it is still valid. Thanks.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [GLUTEN-10745][VL] Refactor parseScanSplitInfo for VeloxPlanConverter [incubator-gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #10742:
URL: https://github.com/apache/incubator-gluten/pull/10742#issuecomment-3305128005
https://github.com/apache/incubator-gluten/issues/10745
--
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.
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [GLUTEN-10745][VL] Refactor parseScanSplitInfo for VeloxPlanConverter [incubator-gluten]
Posted by "jinchengchenghh (via GitHub)" <gi...@apache.org>.
jinchengchenghh commented on code in PR #10742:
URL: https://github.com/apache/incubator-gluten/pull/10742#discussion_r2362248554
##########
cpp/velox/compute/VeloxPlanConverter.cc:
##########
@@ -46,27 +46,31 @@ std::shared_ptr<SplitInfo> parseScanSplitInfo(
using SubstraitFileFormatCase = ::substrait::ReadRel_LocalFiles_FileOrFiles::FileFormatCase;
auto splitInfo = std::make_shared<SplitInfo>();
- splitInfo->paths.reserve(fileList.size());
- splitInfo->starts.reserve(fileList.size());
- splitInfo->lengths.reserve(fileList.size());
- splitInfo->partitionColumns.reserve(fileList.size());
- splitInfo->properties.reserve(fileList.size());
- splitInfo->metadataColumns.reserve(fileList.size());
+ const size_t fileCount = fileList.size();
+
+ splitInfo->paths.reserve(fileCount);
+ splitInfo->starts.reserve(fileCount);
+ splitInfo->lengths.reserve(fileCount);
+ splitInfo->partitionColumns.reserve(fileCount);
+ splitInfo->properties.reserve(fileCount);
+ splitInfo->metadataColumns.reserve(fileCount);
for (const auto& file : fileList) {
// Expect all Partitions share the same index.
splitInfo->partitionIndex = file.partition_index();
std::unordered_map<std::string, std::string> partitionColumnMap;
+ partitionColumnMap.reserve(file.partition_columns_size());
for (const auto& partitionColumn : file.partition_columns()) {
- partitionColumnMap[partitionColumn.key()] = partitionColumn.value();
+ partitionColumnMap.emplace(partitionColumn.key(), partitionColumn.value());
}
- splitInfo->partitionColumns.emplace_back(partitionColumnMap);
+ splitInfo->partitionColumns.emplace_back(std::move(partitionColumnMap));
Review Comment:
For the interface, if the table is not a partitioned table, we should not set the field, I miss an issue before, https://github.com/apache/incubator-gluten/pull/10622
--
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.
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [GLUTEN-10745][VL] Refactor parseScanSplitInfo for VeloxPlanConverter [incubator-gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #10742:
URL: https://github.com/apache/incubator-gluten/pull/10742#issuecomment-3850687310
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [GLUTEN-10745][VL] Refactor parseScanSplitInfo for VeloxPlanConverter [incubator-gluten]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #10742:
URL: https://github.com/apache/incubator-gluten/pull/10742#discussion_r2361555850
##########
cpp/velox/compute/VeloxPlanConverter.cc:
##########
@@ -46,27 +46,31 @@ std::shared_ptr<SplitInfo> parseScanSplitInfo(
using SubstraitFileFormatCase = ::substrait::ReadRel_LocalFiles_FileOrFiles::FileFormatCase;
auto splitInfo = std::make_shared<SplitInfo>();
- splitInfo->paths.reserve(fileList.size());
- splitInfo->starts.reserve(fileList.size());
- splitInfo->lengths.reserve(fileList.size());
- splitInfo->partitionColumns.reserve(fileList.size());
- splitInfo->properties.reserve(fileList.size());
- splitInfo->metadataColumns.reserve(fileList.size());
+ const size_t fileCount = fileList.size();
+
+ splitInfo->paths.reserve(fileCount);
+ splitInfo->starts.reserve(fileCount);
+ splitInfo->lengths.reserve(fileCount);
+ splitInfo->partitionColumns.reserve(fileCount);
+ splitInfo->properties.reserve(fileCount);
+ splitInfo->metadataColumns.reserve(fileCount);
for (const auto& file : fileList) {
// Expect all Partitions share the same index.
splitInfo->partitionIndex = file.partition_index();
std::unordered_map<std::string, std::string> partitionColumnMap;
+ partitionColumnMap.reserve(file.partition_columns_size());
for (const auto& partitionColumn : file.partition_columns()) {
- partitionColumnMap[partitionColumn.key()] = partitionColumn.value();
+ partitionColumnMap.emplace(partitionColumn.key(), partitionColumn.value());
}
- splitInfo->partitionColumns.emplace_back(partitionColumnMap);
+ splitInfo->partitionColumns.emplace_back(std::move(partitionColumnMap));
Review Comment:
`std::move` is safe here even if `partitionColumnMap` is empty.
`emplace_back` could accept the empty `partitionColumnMap`.
The overhead of `std::move` is very small and check if the partitionColumnMap isEmpty brings extra overhead.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [GLUTEN-10745][VL] Refactor parseScanSplitInfo for VeloxPlanConverter [incubator-gluten]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #10742:
URL: https://github.com/apache/incubator-gluten/pull/10742#discussion_r2362276110
##########
cpp/velox/compute/VeloxPlanConverter.cc:
##########
@@ -46,27 +46,31 @@ std::shared_ptr<SplitInfo> parseScanSplitInfo(
using SubstraitFileFormatCase = ::substrait::ReadRel_LocalFiles_FileOrFiles::FileFormatCase;
auto splitInfo = std::make_shared<SplitInfo>();
- splitInfo->paths.reserve(fileList.size());
- splitInfo->starts.reserve(fileList.size());
- splitInfo->lengths.reserve(fileList.size());
- splitInfo->partitionColumns.reserve(fileList.size());
- splitInfo->properties.reserve(fileList.size());
- splitInfo->metadataColumns.reserve(fileList.size());
+ const size_t fileCount = fileList.size();
+
+ splitInfo->paths.reserve(fileCount);
+ splitInfo->starts.reserve(fileCount);
+ splitInfo->lengths.reserve(fileCount);
+ splitInfo->partitionColumns.reserve(fileCount);
+ splitInfo->properties.reserve(fileCount);
+ splitInfo->metadataColumns.reserve(fileCount);
for (const auto& file : fileList) {
// Expect all Partitions share the same index.
splitInfo->partitionIndex = file.partition_index();
std::unordered_map<std::string, std::string> partitionColumnMap;
+ partitionColumnMap.reserve(file.partition_columns_size());
for (const auto& partitionColumn : file.partition_columns()) {
- partitionColumnMap[partitionColumn.key()] = partitionColumn.value();
+ partitionColumnMap.emplace(partitionColumn.key(), partitionColumn.value());
}
- splitInfo->partitionColumns.emplace_back(partitionColumnMap);
+ splitInfo->partitionColumns.emplace_back(std::move(partitionColumnMap));
Review Comment:
Got it.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org