Helper function to convert encoding kind to RLE version
| 40 | |
| 41 | // Helper function to convert encoding kind to RLE version |
| 42 | inline RleVersion convertRleVersion(proto::ColumnEncoding_Kind kind) { |
| 43 | switch (static_cast<int64_t>(kind)) { |
| 44 | case proto::ColumnEncoding_Kind_DIRECT: |
| 45 | case proto::ColumnEncoding_Kind_DICTIONARY: |
| 46 | return RleVersion_1; |
| 47 | case proto::ColumnEncoding_Kind_DIRECT_V2: |
| 48 | case proto::ColumnEncoding_Kind_DICTIONARY_V2: |
| 49 | return RleVersion_2; |
| 50 | default: |
| 51 | throw ParseError("Unknown encoding in convertRleVersion"); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | } // namespace orc |
| 56 |
no test coverage detected