MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / getEncodingSize

Method getEncodingSize

src/processor/operator/order_by/order_by_key_encoder.cpp:75–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75uint32_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
87void OrderByKeyEncoder::flipBytesIfNecessary(uint32_t keyColIdx, uint8_t* tuplePtr,
88 uint32_t numEntriesToEncode, LogicalType& type) {

Callers 2

sortSingleKeyBlockMethod · 0.45

Calls 1

getPhysicalTypeMethod · 0.45

Tested by

no test coverage detected