Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
majetideepak committed Nov 20, 2024
1 parent 7601169 commit 51a5516
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions velox/dwio/parquet/reader/ParquetReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,18 +333,18 @@ std::unique_ptr<ParquetTypeWithId> ReaderBase::getParquetColumnInfo(
TypePtr childRequestedType = nullptr;
bool followChild = true;
if (requestedType && requestedType->isRow()) {
auto rowType =
auto requestedRowType =
std::dynamic_pointer_cast<const velox::RowType>(requestedType);
if (options_.useColumnNamesForColumnMapping()) {
auto fileTypeIdx = rowType->getChildIdxIfExists(childName);
auto fileTypeIdx = requestedRowType->getChildIdxIfExists(childName);
if (fileTypeIdx.has_value()) {
childRequestedType = rowType->childAt(*fileTypeIdx);
childRequestedType = requestedRowType->childAt(*fileTypeIdx);
}
} else {
// Schema Evolution check
if (i < rowType->size()) {
columnNames.push_back(rowType->nameOf(i));
childRequestedType = requestedType->asRow().childAt(i);
// Handle schema evolution.
if (i < requestedRowType->size()) {
columnNames.push_back(requestedRowType->nameOf(i));
childRequestedType = requestedRowType->childAt(i);
} else {
followChild = false;
}
Expand Down

0 comments on commit 51a5516

Please sign in to comment.