MCPcopy Create free account
hub / github.com/apache/impala / WriteDecimalSlot

Function WriteDecimalSlot

be/src/exec/system-table-scanner.cc:101–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101static void WriteDecimalSlot(
102 const ColumnType& type, double value, void* slot) {
103 bool overflow = false;
104 switch (type.GetByteSize()) {
105 case 4:
106 *reinterpret_cast<Decimal4Value*>(slot) =
107 Decimal4Value::FromDouble(type, value, false, &overflow);
108 case 8:
109 *reinterpret_cast<Decimal8Value*>(slot) =
110 Decimal8Value::FromDouble(type, value, false, &overflow);
111 case 16:
112 *reinterpret_cast<Decimal16Value*>(slot) =
113 Decimal16Value::FromDouble(type, value, false, &overflow);
114 }
115 DCHECK(!overflow);
116}
117
118QueryScanner::QueryScanner(RuntimeState* state, RuntimeProfile* profile,
119 TSystemTableName::type table_name)

Callers 4

WriteEventFunction · 0.85
MaterializeNextTupleMethod · 0.85
WriteSlotMethod · 0.85
WriteSlotMethod · 0.85

Calls 1

GetByteSizeMethod · 0.80

Tested by

no test coverage detected