Skip to content

Commit

Permalink
Fix the bug that RowIndex column type cannot be serialized (#11208)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #11208

I came across a bug when I tried to serialize a TableScanNode with special row index column.

### The isssue
`folly::dynamic HiveColumnHandle::serialize()` uses `columnTypeNames` to serialize the TableScanNode. However, RowIndex is missing in `columnTypeNames`. serialize method would raise a std::out_of_range error because of this.

### The fix
The fix is simple -- just add row index column to the map.

Reviewed By: Yuhta

Differential Revision: D64088125

fbshipit-source-id: 7832e7e2fb6d471f294ae8bb3ff33f87d26d5279
  • Loading branch information
Tao Yang authored and facebook-github-bot committed Oct 9, 2024
1 parent 8fec0f7 commit d5df0a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion velox/connectors/hive/TableHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ columnTypeNames() {
{HiveColumnHandle::ColumnType::kPartitionKey, "PartitionKey"},
{HiveColumnHandle::ColumnType::kRegular, "Regular"},
{HiveColumnHandle::ColumnType::kSynthesized, "Synthesized"},
};
{HiveColumnHandle::ColumnType::kRowIndex, "RowIndex"}};
}

template <typename K, typename V>
Expand Down

0 comments on commit d5df0a7

Please sign in to comment.