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

Method writeColumn

src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp:283–515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283void ORCBlockOutputFormat::writeColumn(
284 orc::ColumnVectorBatch & orc_column,
285 const IColumn & column,
286 DataTypePtr & type,
287 const PaddedPODArray<UInt8> * null_bytemap)
288{
289 orc_column.notNull.resize(column.size());
290 if (null_bytemap)
291 orc_column.hasNulls = true;
292
293 switch (type->getTypeId())
294 {
295 case TypeIndex::Enum8: [[fallthrough]];
296 case TypeIndex::Int8:
297 {
298 /// Note: Explicit cast to avoid clang-tidy error: 'signed char' to 'long' conversion; consider casting to 'unsigned char' first.
299 writeNumbers<Int8, orc::LongVectorBatch>(orc_column, column, null_bytemap, [](const Int8 & value){ return static_cast<int64_t>(value); });
300 break;
301 }
302 case TypeIndex::UInt8:
303 {
304 writeNumbers<UInt8, orc::LongVectorBatch>(orc_column, column, null_bytemap, [](const UInt8 & value){ return value; });
305 break;
306 }
307 case TypeIndex::Enum16: [[fallthrough]];
308 case TypeIndex::Int16:
309 {
310 writeNumbers<Int16, orc::LongVectorBatch>(orc_column, column, null_bytemap, [](const Int16 & value){ return value; });
311 break;
312 }
313 case TypeIndex::Date: [[fallthrough]];
314 case TypeIndex::UInt16:
315 {
316 writeNumbers<UInt16, orc::LongVectorBatch>(orc_column, column, null_bytemap, [](const UInt16 & value){ return value; });
317 break;
318 }
319 case TypeIndex::Date32: [[fallthrough]];
320 case TypeIndex::Int32:
321 {
322 writeNumbers<Int32, orc::LongVectorBatch>(orc_column, column, null_bytemap, [](const Int32 & value){ return value; });
323 break;
324 }
325 case TypeIndex::UInt32:
326 {
327 writeNumbers<UInt32, orc::LongVectorBatch>(orc_column, column, null_bytemap, [](const UInt32 & value){ return value; });
328 break;
329 }
330 case TypeIndex::IPv4:
331 {
332 writeNumbers<IPv4, orc::LongVectorBatch>(orc_column, column, null_bytemap, [](const IPv4 & value){ return value.toUnderType(); });
333 break;
334 }
335 case TypeIndex::Int64:
336 {
337 writeNumbers<Int64, orc::LongVectorBatch>(orc_column, column, null_bytemap, [](const Int64 & value){ return value; });
338 break;
339 }
340 case TypeIndex::UInt64:

Callers

nothing calls this directly

Calls 15

powFunction · 0.85
removeNullableFunction · 0.85
getNullMapColumnPtrMethod · 0.80
getNestedTypeMethod · 0.80
tupleSizeMethod · 0.80
ExceptionClass · 0.50
resizeMethod · 0.45
sizeMethod · 0.45
getTypeIdMethod · 0.45
getMethod · 0.45
getScaleMethod · 0.45
getDataMethod · 0.45

Tested by

no test coverage detected