| 73 | } |
| 74 | |
| 75 | uint32_t OrderByKeyEncoder::getEncodingSize(const LogicalType& dataType) { |
| 76 | // Add one more byte for null flag. |
| 77 | switch (dataType.getPhysicalType()) { |
| 78 | case PhysicalTypeID::STRING: |
| 79 | case PhysicalTypeID::JSON: |
| 80 | // 1 byte for null flag + 1 byte to indicate long/short string + 12 bytes for string prefix |
| 81 | return 2 + string_t::SHORT_STR_LENGTH; |
| 82 | default: |
| 83 | return 1 + storage::StorageUtils::getDataTypeSize(dataType); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | void OrderByKeyEncoder::flipBytesIfNecessary(uint32_t keyColIdx, uint8_t* tuplePtr, |
| 88 | uint32_t numEntriesToEncode, LogicalType& type) { |
no test coverage detected