OmniSciDB  5ade3759e0
anonymous_namespace{ColumnarResults.cpp} Namespace Reference

Functions

int64_t fixed_encoding_nullable_val (const int64_t val, const SQLTypeInfo &type_info)
 

Function Documentation

◆ fixed_encoding_nullable_val()

int64_t anonymous_namespace{ColumnarResults.cpp}::fixed_encoding_nullable_val ( const int64_t  val,
const SQLTypeInfo type_info 
)
inline

Definition at line 28 of file ColumnarResults.cpp.

References CHECK, SQLTypeInfoCore< TYPE_FACET_PACK >::get_compression(), get_logical_type_info(), inline_fixed_encoding_null_val(), inline_int_null_val(), kENCODING_DICT, kENCODING_FIXED, and kENCODING_NONE.

Referenced by ColumnarResults::writeBackCell(), and ColumnarResults::writeBackCellDirect().

29  {
30  if (type_info.get_compression() != kENCODING_NONE) {
31  CHECK(type_info.get_compression() == kENCODING_FIXED ||
32  type_info.get_compression() == kENCODING_DICT);
33  auto logical_ti = get_logical_type_info(type_info);
34  if (val == inline_int_null_val(logical_ti)) {
35  return inline_fixed_encoding_null_val(type_info);
36  }
37  }
38  return val;
39 }
SQLTypeInfo get_logical_type_info(const SQLTypeInfo &type_info)
Definition: sqltypes.h:840
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:331
#define CHECK(condition)
Definition: Logger.h:187
int64_t inline_int_null_val(const SQL_TYPE_INFO &ti)
int64_t inline_fixed_encoding_null_val(const SQL_TYPE_INFO &ti)
+ Here is the call graph for this function:
+ Here is the caller graph for this function: