Skip to content

Commit

Permalink
Fix the bug that RowIndex column type cannot be serialized (facebooki…
Browse files Browse the repository at this point in the history
…ncubator#11208)

Summary:

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.

Differential Revision: D64088125
  • Loading branch information
Tao Yang authored and facebook-github-bot committed Oct 9, 2024
1 parent acd5717 commit ffd4ef5
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 ffd4ef5

Please sign in to comment.