MCPcopy Create free account
hub / github.com/ByConity/ByConity / expand

Method expand

src/Functions/mortonEncode.cpp:270–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268{
269public:
270 static UInt64 expand(UInt64 ratio, UInt64 value)
271 {
272 switch (ratio)
273 {
274 case 1:
275 return value;
276 case 2:
277 return MortonND_2D::Encode(0, value);
278 case 3:
279 return MortonND_3D::Encode(0, 0, value);
280 case 4:
281 return MortonND_4D::Encode(0, 0, 0, value);
282 case 5:
283 return MortonND_5D::Encode(0, 0, 0, 0, value);
284 case 6:
285 return MortonND_6D::Encode(0, 0, 0, 0, 0, value);
286 case 7:
287 return MortonND_7D::Encode(0, 0, 0, 0, 0, 0, value);
288 case 8:
289 return MortonND_8D::Encode(0, 0, 0, 0, 0, 0, 0, value);
290 }
291 return value;
292 }
293
294 ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t input_rows_count) const override
295 {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected