OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sqltypes.h File Reference

Constants for Builtin SQL Types supported by HEAVY.AI. More...

#include "toString.h"
#include "../Logger/Logger.h"
#include "../QueryEngine/Utils/FlatBuffer.h"
#include "Datum.h"
#include "funcannotations.h"
#include "sqltypes_lite.h"
#include <cassert>
#include <ctime>
#include <memory>
#include <ostream>
#include <sstream>
#include <string>
#include <type_traits>
#include <vector>
#include "Shared/DbObjectKeys.h"
#include "InlineNullValues.h"
#include <string_view>
#include "../QueryEngine/DateAdd.h"
#include "../QueryEngine/DateTruncate.h"
#include "../QueryEngine/ExtractFromTime.h"
+ Include dependency graph for sqltypes.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DoNothingDeleter
 
struct  FreeDeleter
 
struct  HostArrayDatum
 
struct  DeviceArrayDatum
 
union  DataBlockPtr
 
class  SQLTypeInfo
 
union  null_value_t
 
struct  SqlLiteralArg
 

Namespaces

 sql_constants
 

Macros

#define IS_INTEGER(T)   (((T) == kINT) || ((T) == kSMALLINT) || ((T) == kBIGINT) || ((T) == kTINYINT))
 
#define IS_NUMBER(T)
 
#define IS_STRING(T)   (((T) == kTEXT) || ((T) == kVARCHAR) || ((T) == kCHAR))
 
#define IS_GEO(T)
 
#define IS_INTERVAL(T)   ((T) == kINTERVAL_DAY_TIME || (T) == kINTERVAL_YEAR_MONTH)
 
#define IS_DECIMAL(T)   ((T) == kNUMERIC || (T) == kDECIMAL)
 
#define IS_GEO_POLY(T)   (((T) == kPOLYGON) || ((T) == kMULTIPOLYGON))
 
#define IS_GEO_LINE(T)   (((T) == kLINESTRING) || ((T) == kMULTILINESTRING))
 
#define IS_GEO_MULTI(T)   (((T) == kMULTIPOLYGON) || ((T) == kMULTILINESTRING) || ((T) == kMULTIPOINT))
 
#define TRANSIENT_DICT(ID)   (-(ID))
 
#define REGULAR_DICT(TRANSIENTID)   (-(TRANSIENTID))
 

Typedefs

using ArrayDatum = std::conditional_t< is_cuda_compiler(), DeviceArrayDatum, HostArrayDatum >
 
using StringOffsetT = int32_t
 
using ArrayOffsetT = int32_t
 

Enumerations

enum  SQLTypes {
  kNULLT = 0, kBOOLEAN = 1, kCHAR = 2, kVARCHAR = 3,
  kNUMERIC = 4, kDECIMAL = 5, kINT = 6, kSMALLINT = 7,
  kFLOAT = 8, kDOUBLE = 9, kTIME = 10, kTIMESTAMP = 11,
  kBIGINT = 12, kTEXT = 13, kDATE = 14, kARRAY = 15,
  kINTERVAL_DAY_TIME = 16, kINTERVAL_YEAR_MONTH = 17, kPOINT = 18, kLINESTRING = 19,
  kPOLYGON = 20, kMULTIPOLYGON = 21, kTINYINT = 22, kGEOMETRY = 23,
  kGEOGRAPHY = 24, kEVAL_CONTEXT_TYPE = 25, kVOID = 26, kCURSOR = 27,
  kCOLUMN = 28, kCOLUMN_LIST = 29, kMULTILINESTRING = 30, kMULTIPOINT = 31,
  kSQLTYPE_LAST = 32
}
 
enum  EncodingType {
  kENCODING_NONE = 0, kENCODING_FIXED = 1, kENCODING_RL = 2, kENCODING_DIFF = 3,
  kENCODING_DICT = 4, kENCODING_SPARSE = 5, kENCODING_GEOINT = 6, kENCODING_DATE_IN_DAYS = 7,
  kENCODING_ARRAY = 8, kENCODING_ARRAY_DICT = 9, kENCODING_LAST = 10
}
 

Functions

std::string toString (const SQLTypes &type)
 
std::ostream & operator<< (std::ostream &os, SQLTypes const sql_type)
 
DEVICE constexpr bool is_cuda_compiler ()
 
std::ostream & operator<< (std::ostream &os, EncodingType const type)
 
std::string toString (const EncodingType &type)
 
constexpr auto is_datetime (SQLTypes type)
 
SQLTypes decimal_to_int_type (const SQLTypeInfo &)
 
SQLTypes string_dict_to_int_type (const SQLTypeInfo &)
 
Datum NullDatum (const SQLTypeInfo &ti)
 
bool IsNullDatum (const Datum d, const SQLTypeInfo &ti)
 
Datum StringToDatum (const std::string_view s, SQLTypeInfo &ti)
 
std::string DatumToString (const Datum d, const SQLTypeInfo &ti)
 
int64_t extract_int_type_from_datum (const Datum datum, const SQLTypeInfo &ti)
 
double extract_fp_type_from_datum (const Datum datum, const SQLTypeInfo &ti)
 
bool DatumEqual (const Datum, const Datum, const SQLTypeInfo &ti)
 
int64_t convert_decimal_value_to_scale (const int64_t decimal_value, const SQLTypeInfo &type_info, const SQLTypeInfo &new_type_info)
 
std::ostream & operator<< (std::ostream &os, const SQLTypeInfo &type_info)
 
SQLTypes get_int_type_by_size (size_t const nbytes)
 
SQLTypeInfo get_logical_type_info (const SQLTypeInfo &type_info)
 
SQLTypeInfo get_nullable_type_info (const SQLTypeInfo &type_info)
 
SQLTypeInfo get_nullable_logical_type_info (const SQLTypeInfo &type_info)
 
int8_t * append_datum (int8_t *buf, const Datum &d, const SQLTypeInfo &ti)
 
auto generate_column_type (const SQLTypeInfo &elem_ti)
 
auto generate_column_list_type (const SQLTypeInfo &elem_ti)
 
DEVICE void VarlenArray_get_nth (int8_t *buf, int n, ArrayDatum *result, bool *is_end)
 
DEVICE void VarlenArray_get_nth (int8_t *buf, int n, bool uncompress, VarlenDatum *result, bool *is_end)
 
void getFlatBufferNDimsAndSizes (const int64_t items_count, const int64_t max_nof_values, const SQLTypeInfo &ti, size_t &ndims, int64_t &max_nof_sizes)
 
int64_t getFlatBufferSize (int64_t items_count, int64_t max_nof_values, const SQLTypeInfo &ti)
 
null_value_t get_null_value (const SQLTypeInfo &ti)
 
void initializeFlatBuffer (FlatBufferManager &m, int64_t items_count, int64_t max_nof_values, const SQLTypeInfo &ti)
 
bool geo_promoted_type_match (const SQLTypes a, const SQLTypes b)
 

Variables

static constexpr int32_t sql_constants::kMaxNumericPrecision
 
static constexpr int32_t sql_constants::kMaxRepresentableNumericPrecision
 

Detailed Description

Constants for Builtin SQL Types supported by HEAVY.AI.

Definition in file sqltypes.h.

Macro Definition Documentation

#define IS_DECIMAL (   T)    ((T) == kNUMERIC || (T) == kDECIMAL)

Definition at line 314 of file sqltypes.h.

#define IS_GEO (   T)
Value:
(((T) == kPOINT) || ((T) == kLINESTRING) || ((T) == kMULTILINESTRING) || \
((T) == kMULTIPOINT) || ((T) == kPOLYGON) || ((T) == kMULTIPOLYGON))

Definition at line 310 of file sqltypes.h.

Referenced by spatial_type::Distance::codegenLoads(), RelAlgExecutor::createTableFunctionWorkUnit(), Catalog_Namespace::Catalog::expandGeoColumn(), SQLTypeInfo::get_elem_type(), SQLTypeInfo::get_type_name(), Executor::getColLazyFetchInfo(), anonymous_namespace{DdlCommandExecutor.cpp}::JsonColumnSqlType::getParam1(), anonymous_namespace{DdlCommandExecutor.cpp}::JsonColumnSqlType::getParam2(), EmbeddedDatabase::DBEngineImpl::getTableDetails(), import_export::import_thread_delimited(), SQLTypeInfo::is_geometry(), SQLTypeInfo::is_varlen(), ResultSet::isGeoColOnGpu(), DBHandler::populateThriftColumnType(), foreign_storage::TextFileBufferParser::processGeoColumn(), foreign_storage::TextFileBufferParser::processInvalidGeoColumn(), ThriftSerializers::target_meta_info_to_thrift(), thrift_to_name(), SQLTypeInfo::transforms(), RelAlgTranslator::translateGeoColumn(), RelAlgTranslator::translateGeoFunctionArg(), RelAlgTranslator::translateUnaryGeoFunction(), type_info_from_thrift(), ThriftSerializers::type_info_to_thrift(), ddl_utils::validate_and_set_type(), and anonymous_namespace{RelAlgExecutor.cpp}::RexUsedInputsVisitor::visitInput().

#define IS_GEO_LINE (   T)    (((T) == kLINESTRING) || ((T) == kMULTILINESTRING))

Definition at line 316 of file sqltypes.h.

#define IS_GEO_MULTI (   T)    (((T) == kMULTIPOLYGON) || ((T) == kMULTILINESTRING) || ((T) == kMULTIPOINT))

Definition at line 317 of file sqltypes.h.

Referenced by spatial_type::NumGeometries::codegenLoads().

#define IS_GEO_POLY (   T)    (((T) == kPOLYGON) || ((T) == kMULTIPOLYGON))
#define IS_INTERVAL (   T)    ((T) == kINTERVAL_DAY_TIME || (T) == kINTERVAL_YEAR_MONTH)

Definition at line 313 of file sqltypes.h.

Referenced by SQLTypeInfo::is_timeinterval().

#define IS_NUMBER (   T)
Value:
(((T) == kINT) || ((T) == kSMALLINT) || ((T) == kDOUBLE) || ((T) == kFLOAT) || \
((T) == kBIGINT) || ((T) == kNUMERIC) || ((T) == kDECIMAL) || ((T) == kTINYINT))
Definition: sqltypes.h:72

Definition at line 306 of file sqltypes.h.

Referenced by generate_column_type(), SQLTypeInfo::is_number(), and anonymous_namespace{EquiJoinCondition.cpp}::make_composite_equals_impl().

#define REGULAR_DICT (   TRANSIENTID)    (-(TRANSIENTID))

Definition at line 323 of file sqltypes.h.

Referenced by RowSetMemoryOwner::getOrAddStringDictProxy().

Typedef Documentation

Definition at line 229 of file sqltypes.h.

using ArrayOffsetT = int32_t

Definition at line 1494 of file sqltypes.h.

using StringOffsetT = int32_t

Definition at line 1493 of file sqltypes.h.

Enumeration Type Documentation

Enumerator
kENCODING_NONE 
kENCODING_FIXED 
kENCODING_RL 
kENCODING_DIFF 
kENCODING_DICT 
kENCODING_SPARSE 
kENCODING_GEOINT 
kENCODING_DATE_IN_DAYS 
kENCODING_ARRAY 
kENCODING_ARRAY_DICT 
kENCODING_LAST 

Definition at line 240 of file sqltypes.h.

240  {
241  kENCODING_NONE = 0, // no encoding
242  kENCODING_FIXED = 1, // Fixed-bit encoding
243  kENCODING_RL = 2, // Run Length encoding
244  kENCODING_DIFF = 3, // Differential encoding
245  kENCODING_DICT = 4, // Dictionary encoding
246  kENCODING_SPARSE = 5, // Null encoding for sparse columns
247  kENCODING_GEOINT = 6, // Encoding coordinates as intergers
248  kENCODING_DATE_IN_DAYS = 7, // Date encoding in days
249  kENCODING_ARRAY = 8, // Array encoding for columns of arrays
250  kENCODING_ARRAY_DICT = 9, // Array encoding for columns of text encoding dict arrays
251  kENCODING_LAST = 10
252 };
enum SQLTypes
Enumerator
kNULLT 
kBOOLEAN 
kCHAR 
kVARCHAR 
kNUMERIC 
kDECIMAL 
kINT 
kSMALLINT 
kFLOAT 
kDOUBLE 
kTIME 
kTIMESTAMP 
kBIGINT 
kTEXT 
kDATE 
kARRAY 
kINTERVAL_DAY_TIME 
kINTERVAL_YEAR_MONTH 
kPOINT 
kLINESTRING 
kPOLYGON 
kMULTIPOLYGON 
kTINYINT 
kGEOMETRY 
kGEOGRAPHY 
kEVAL_CONTEXT_TYPE 
kVOID 
kCURSOR 
kCOLUMN 
kCOLUMN_LIST 
kMULTILINESTRING 
kMULTIPOINT 
kSQLTYPE_LAST 

Definition at line 65 of file sqltypes.h.

65  {
66  kNULLT = 0, // type for null values
67  kBOOLEAN = 1,
68  kCHAR = 2,
69  kVARCHAR = 3,
70  kNUMERIC = 4,
71  kDECIMAL = 5,
72  kINT = 6,
73  kSMALLINT = 7,
74  kFLOAT = 8,
75  kDOUBLE = 9,
76  kTIME = 10,
77  kTIMESTAMP = 11,
78  kBIGINT = 12,
79  kTEXT = 13,
80  kDATE = 14,
81  kARRAY = 15,
82  kINTERVAL_DAY_TIME = 16,
84  kPOINT = 18,
85  kLINESTRING = 19,
86  kPOLYGON = 20,
87  kMULTIPOLYGON = 21,
88  kTINYINT = 22,
89  kGEOMETRY = 23,
90  kGEOGRAPHY = 24,
91  kEVAL_CONTEXT_TYPE = 25, // Placeholder Type for ANY
92  kVOID = 26,
93  kCURSOR = 27,
94  kCOLUMN = 28,
95  kCOLUMN_LIST = 29,
96  kMULTILINESTRING = 30,
97  kMULTIPOINT = 31,
98  kSQLTYPE_LAST = 32
99 };
Definition: sqltypes.h:76
Definition: sqltypes.h:92
Definition: sqltypes.h:79
Definition: sqltypes.h:80
Definition: sqltypes.h:68
Definition: sqltypes.h:72

Function Documentation

int8_t* append_datum ( int8_t *  buf,
const Datum d,
const SQLTypeInfo ti 
)

Definition at line 580 of file Datum.cpp.

References Datum::bigintval, Datum::boolval, Datum::doubleval, Datum::floatval, SQLTypeInfo::get_type(), Datum::intval, SQLTypeInfo::is_dict_encoded_string(), kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kDOUBLE, kFLOAT, kINT, kNUMERIC, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, Datum::smallintval, string_dict_to_int_type(), Datum::tinyintval, run_benchmark_import::type, and UNREACHABLE.

Referenced by RelAlgExecutor::executeSimpleInsert(), import_export::NullArray(), import_export::StringToArray(), and import_export::TDatumToArrayDatum().

580  {
581  SQLTypes type;
582  if (ti.is_dict_encoded_string()) {
583  type = string_dict_to_int_type(ti);
584  } else {
585  type = ti.get_type();
586  }
587  switch (type) {
588  case kBOOLEAN:
589  *(int8_t*)buf = d.boolval;
590  return buf + sizeof(int8_t);
591  case kNUMERIC:
592  case kDECIMAL:
593  case kBIGINT:
594  *(int64_t*)buf = d.bigintval;
595  return buf + sizeof(int64_t);
596  case kINT:
597  *(int32_t*)buf = d.intval;
598  return buf + sizeof(int32_t);
599  case kSMALLINT:
600  *(int16_t*)buf = d.smallintval;
601  return buf + sizeof(int16_t);
602  case kTINYINT:
603  *(int8_t*)buf = d.tinyintval;
604  return buf + sizeof(int8_t);
605  case kFLOAT:
606  *(float*)buf = d.floatval;
607  return buf + sizeof(float);
608  case kDOUBLE:
609  *(double*)buf = d.doubleval;
610  return buf + sizeof(double);
611  case kTIME:
612  case kTIMESTAMP:
613  case kDATE:
614  *reinterpret_cast<int64_t*>(buf) = d.bigintval;
615  return buf + sizeof(int64_t);
616  default:
617  UNREACHABLE() << "Unexpected type: " << type;
618  return nullptr;
619  }
620 }
int8_t tinyintval
Definition: Datum.h:71
Definition: sqltypes.h:76
SQLTypes
Definition: sqltypes.h:65
int8_t boolval
Definition: Datum.h:70
#define UNREACHABLE()
Definition: Logger.h:338
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:391
int32_t intval
Definition: Datum.h:73
float floatval
Definition: Datum.h:75
int64_t bigintval
Definition: Datum.h:74
int16_t smallintval
Definition: Datum.h:72
Definition: sqltypes.h:80
bool is_dict_encoded_string() const
Definition: sqltypes.h:641
Definition: sqltypes.h:72
double doubleval
Definition: Datum.h:76
SQLTypes string_dict_to_int_type(const SQLTypeInfo &ti)
Definition: Datum.cpp:565

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int64_t convert_decimal_value_to_scale ( const int64_t  decimal_value,
const SQLTypeInfo type_info,
const SQLTypeInfo new_type_info 
)

Definition at line 624 of file Datum.cpp.

References anonymous_namespace{Datum.cpp}::convert_decimal_value_to_scale_internal(), and SQLTypeInfo::get_scale().

Referenced by import_export::TypedImportBuffer::addDefaultValues(), Analyzer::Constant::cast_number(), anonymous_namespace{ArrowImporter.h}::ArrowValue< arrow::Decimal128 >::operator DATA_TYPE(), parse_numeric(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), and ddl_utils::anonymous_namespace{DdlUtils.cpp}::validate_literal().

626  {
627  int const dscale = new_type_info.get_scale() - type_info.get_scale();
628  return convert_decimal_value_to_scale_internal(decimal_value, dscale);
629 }
HOST DEVICE int get_scale() const
Definition: sqltypes.h:396
int64_t convert_decimal_value_to_scale_internal(const int64_t decimal_value, int const dscale)
Definition: Datum.cpp:81

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool DatumEqual ( const Datum  ,
const Datum  ,
const SQLTypeInfo ti 
)

Definition at line 408 of file Datum.cpp.

References Datum::bigintval, Datum::boolval, Datum::doubleval, Datum::floatval, SQLTypeInfo::get_compression(), SQLTypeInfo::get_type(), Datum::intval, kBIGINT, kBOOLEAN, kCHAR, kDATE, kDECIMAL, kDOUBLE, kENCODING_DICT, kFLOAT, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kNUMERIC, kPOINT, kPOLYGON, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, Datum::smallintval, Datum::stringval, and Datum::tinyintval.

Referenced by IsNullDatum(), ChunkMetadata::operator==(), FixedLengthArrayNoneEncoder::resetChunkStats(), and ArrayNoneEncoder::resetChunkStats().

408  {
409  switch (ti.get_type()) {
410  case kBOOLEAN:
411  return a.boolval == b.boolval;
412  case kBIGINT:
413  case kNUMERIC:
414  case kDECIMAL:
415  return a.bigintval == b.bigintval;
416  case kINT:
417  return a.intval == b.intval;
418  case kSMALLINT:
419  return a.smallintval == b.smallintval;
420  case kTINYINT:
421  return a.tinyintval == b.tinyintval;
422  case kFLOAT:
423  return a.floatval == b.floatval;
424  case kDOUBLE:
425  return a.doubleval == b.doubleval;
426  case kTIME:
427  case kTIMESTAMP:
428  case kDATE:
429  case kINTERVAL_DAY_TIME:
431  return a.bigintval == b.bigintval;
432  case kTEXT:
433  case kVARCHAR:
434  case kCHAR:
435  case kPOINT:
436  case kMULTIPOINT:
437  case kLINESTRING:
438  case kMULTILINESTRING:
439  case kPOLYGON:
440  case kMULTIPOLYGON:
441  if (ti.get_compression() == kENCODING_DICT) {
442  return a.intval == b.intval;
443  }
444  if (a.stringval == nullptr && b.stringval == nullptr) {
445  return true;
446  }
447  if (a.stringval == nullptr || b.stringval == nullptr) {
448  return false;
449  }
450  return *a.stringval == *b.stringval;
451  default:
452  return false;
453  }
454  return false;
455 }
Definition: sqltypes.h:76
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:391
constexpr double a
Definition: Utm.h:32
Definition: sqltypes.h:79
Definition: sqltypes.h:80
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:399
Definition: sqltypes.h:68
Definition: sqltypes.h:72

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string DatumToString ( const Datum  d,
const SQLTypeInfo ti 
)

Definition at line 460 of file Datum.cpp.

References Datum::bigintval, Datum::boolval, CHECK_EQ, CHECK_LE, CHECK_LT, Datum::doubleval, Datum::floatval, shared::formatDate(), shared::formatDateTime(), shared::formatHMS(), SQLTypeInfo::get_dimension(), SQLTypeInfo::get_scale(), SQLTypeInfo::get_type(), SQLTypeInfo::get_type_name(), Datum::intval, kBIGINT, kBOOLEAN, kCHAR, kDATE, kDECIMAL, kDOUBLE, kFLOAT, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kNUMERIC, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, Datum::smallintval, Datum::stringval, Datum::tinyintval, to_string(), and SQLTypeInfo::to_string().

Referenced by anonymous_namespace{TableFunctionExecutionContext.cpp}::append_literal_buffer(), Analyzer::Constant::cast_to_string(), foreign_storage::datetime_to_string(), foreign_storage::TypedParquetInPlaceEncoder< V, V >::integralTypeToString(), anonymous_namespace{ArrowImporter.h}::ArrowValue< int64_t >::operator DATA_TYPE(), operator<<(), import_export::anonymous_namespace{QueryExporterCSV.cpp}::target_value_to_string(), Analyzer::Constant::toString(), Timestamp::toString(), Fragmenter_Namespace::InsertOrderFragmenter::updateChunkStats(), and ScalarExprToSql::visitConstant().

460  {
461  constexpr size_t buf_size = 64;
462  char buf[buf_size]; // Hold "2000-03-01 12:34:56.123456789" and large years.
463  switch (ti.get_type()) {
464  case kBOOLEAN:
465  if (d.boolval) {
466  return "t";
467  }
468  return "f";
469  case kNUMERIC:
470  case kDECIMAL: {
471  double v = (double)d.bigintval / pow(10, ti.get_scale());
472  int size = snprintf(buf, buf_size, "%*.*f", ti.get_dimension(), ti.get_scale(), v);
473  CHECK_LE(0, size) << v << ' ' << ti.to_string();
474  CHECK_LT(size_t(size), buf_size) << v << ' ' << ti.to_string();
475  return buf;
476  }
477  case kINT:
478  return std::to_string(d.intval);
479  case kSMALLINT:
480  return std::to_string(d.smallintval);
481  case kTINYINT:
482  return std::to_string(d.tinyintval);
483  case kBIGINT:
484  return std::to_string(d.bigintval);
485  case kFLOAT:
486  return std::to_string(d.floatval);
487  case kDOUBLE:
488  return std::to_string(d.doubleval);
489  case kTIME: {
490  size_t const len = shared::formatHMS(buf, buf_size, d.bigintval);
491  CHECK_EQ(8u, len); // 8 == strlen("HH:MM:SS")
492  return buf;
493  }
494  case kTIMESTAMP: {
495  unsigned const dim = ti.get_dimension(); // assumes dim <= 9
496  size_t const len = shared::formatDateTime(buf, buf_size, d.bigintval, dim);
497  CHECK_LE(19u + bool(dim) + dim, len); // 19 = strlen("YYYY-MM-DD HH:MM:SS")
498  return buf;
499  }
500  case kDATE: {
501  size_t const len = shared::formatDate(buf, buf_size, d.bigintval);
502  CHECK_LE(10u, len); // 10 == strlen("YYYY-MM-DD")
503  return buf;
504  }
505  case kINTERVAL_DAY_TIME:
506  return std::to_string(d.bigintval) + " ms (day-time interval)";
508  return std::to_string(d.bigintval) + " month(s) (year-month interval)";
509  case kTEXT:
510  case kVARCHAR:
511  case kCHAR:
512  if (d.stringval == nullptr) {
513  return "NULL";
514  }
515  return *d.stringval;
516  default:
517  throw std::runtime_error("Internal error: invalid type " + ti.get_type_name() +
518  " in DatumToString.");
519  }
520  return "";
521 }
int8_t tinyintval
Definition: Datum.h:71
#define CHECK_EQ(x, y)
Definition: Logger.h:301
Definition: sqltypes.h:76
HOST DEVICE int get_scale() const
Definition: sqltypes.h:396
int8_t boolval
Definition: Datum.h:70
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:391
int32_t intval
Definition: Datum.h:73
std::string to_string(char const *&&v)
size_t formatHMS(char *buf, size_t const max, int64_t const unixtime)
Definition: misc.cpp:96
float floatval
Definition: Datum.h:75
std::string to_string() const
Definition: sqltypes.h:526
int64_t bigintval
Definition: Datum.h:74
int16_t smallintval
Definition: Datum.h:72
std::string * stringval
Definition: Datum.h:79
size_t formatDate(char *buf, size_t const max, int64_t const unixtime)
Definition: misc.cpp:27
#define CHECK_LT(x, y)
Definition: Logger.h:303
Definition: sqltypes.h:79
Definition: sqltypes.h:80
#define CHECK_LE(x, y)
Definition: Logger.h:304
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:393
std::string get_type_name() const
Definition: sqltypes.h:482
size_t formatDateTime(char *buf, size_t const max, int64_t const timestamp, int const dimension, bool use_iso_format)
Definition: misc.cpp:45
Definition: sqltypes.h:68
Definition: sqltypes.h:72
double doubleval
Definition: Datum.h:76

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double extract_fp_type_from_datum ( const Datum  datum,
const SQLTypeInfo ti 
)

Definition at line 549 of file Datum.cpp.

References Datum::doubleval, Datum::floatval, SQLTypeInfo::get_type(), kDOUBLE, kFLOAT, and run_benchmark_import::type.

Referenced by extract_max_stat_fp_type(), and extract_min_stat_fp_type().

549  {
550  const auto type = ti.get_type();
551  switch (type) {
552  case kFLOAT:
553  return datum.floatval;
554  case kDOUBLE:
555  return datum.doubleval;
556  default:
557  abort();
558  }
559 }
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:391
float floatval
Definition: Datum.h:75
double doubleval
Definition: Datum.h:76

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int64_t extract_int_type_from_datum ( const Datum  datum,
const SQLTypeInfo ti 
)

Definition at line 523 of file Datum.cpp.

References Datum::bigintval, CHECK_EQ, decimal_to_int_type(), SQLTypeInfo::get_compression(), SQLTypeInfo::get_type(), Datum::intval, SQLTypeInfo::is_decimal(), kBIGINT, kBOOLEAN, kCHAR, kDATE, kENCODING_DICT, kINT, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, Datum::smallintval, Datum::tinyintval, and run_benchmark_import::type.

Referenced by extract_max_stat_int_type(), extract_min_stat_int_type(), StringOps_Namespace::StringOpInfo::getIntLiteral(), ChunkMetadata::isPlaceholder(), and StringOps_Namespace::operator<<().

523  {
524  const auto type = ti.is_decimal() ? decimal_to_int_type(ti) : ti.get_type();
525  switch (type) {
526  case kBOOLEAN:
527  return datum.tinyintval;
528  case kTINYINT:
529  return datum.tinyintval;
530  case kSMALLINT:
531  return datum.smallintval;
532  case kCHAR:
533  case kVARCHAR:
534  case kTEXT:
536  case kINT:
537  return datum.intval;
538  case kBIGINT:
539  return datum.bigintval;
540  case kTIME:
541  case kTIMESTAMP:
542  case kDATE:
543  return datum.bigintval;
544  default:
545  abort();
546  }
547 }
int8_t tinyintval
Definition: Datum.h:71
#define CHECK_EQ(x, y)
Definition: Logger.h:301
Definition: sqltypes.h:76
int32_t intval
Definition: Datum.h:73
int64_t bigintval
Definition: Datum.h:74
int16_t smallintval
Definition: Datum.h:72
SQLTypes decimal_to_int_type(const SQLTypeInfo &ti)
Definition: Datum.cpp:561
Definition: sqltypes.h:79
Definition: sqltypes.h:80
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:399
Definition: sqltypes.h:68
Definition: sqltypes.h:72
bool is_decimal() const
Definition: sqltypes.h:568

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

auto generate_column_list_type ( const SQLTypeInfo elem_ti)
inline

Definition at line 1699 of file sqltypes.h.

References generate_column_type(), kCOLUMN_LIST, kNULLT, and kTIMESTAMP.

Referenced by bind_function().

1699  {
1700  auto type_info = generate_column_type(elem_ti);
1701  if (type_info.get_subtype() != kNULLT) {
1702  type_info.set_type(kCOLUMN_LIST);
1703  }
1704  if (type_info.get_subtype() == kTIMESTAMP) {
1705  // ColumnList<Timestamp> is not supported, see QE-472
1706  type_info.set_subtype(kNULLT);
1707  }
1708  return type_info;
1709 }
auto generate_column_type(const SQLTypeInfo &elem_ti)
Definition: sqltypes.h:1627

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

auto generate_column_type ( const SQLTypeInfo elem_ti)
inline

Definition at line 1627 of file sqltypes.h.

References SQLTypeInfo::get_comp_param(), SQLTypeInfo::get_compression(), SQLTypeInfo::get_dimension(), SQLTypeInfo::get_scale(), SQLTypeInfo::get_subtype(), SQLTypeInfo::get_type(), SQLTypeInfo::getStringDictKey(), IS_NUMBER, kARRAY, kBIGINT, kBOOLEAN, kCOLUMN, kDOUBLE, kENCODING_ARRAY, kENCODING_ARRAY_DICT, kENCODING_DICT, kENCODING_GEOINT, kENCODING_NONE, kFLOAT, kINT, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kNULLT, kPOINT, kPOLYGON, kSMALLINT, kTEXT, kTIMESTAMP, kTINYINT, kVARCHAR, and SQLTypeInfo::set_subtype().

Referenced by bind_function(), and generate_column_list_type().

1627  {
1628  SQLTypes elem_type = elem_ti.get_type();
1629  if (elem_type == kCOLUMN) {
1630  if (elem_ti.get_subtype() == kVARCHAR) {
1631  auto new_elem_ti = elem_ti;
1632  new_elem_ti.set_subtype(kTEXT);
1633  return new_elem_ti;
1634  }
1635  return elem_ti;
1636  }
1637  auto c = elem_ti.get_compression();
1638  auto d = elem_ti.get_dimension();
1639  auto s = elem_ti.get_scale();
1640  auto p = elem_ti.get_comp_param();
1641  switch (elem_type) {
1642  case kBOOLEAN:
1643  case kTINYINT:
1644  case kSMALLINT:
1645  case kINT:
1646  case kBIGINT:
1647  case kFLOAT:
1648  case kDOUBLE:
1649  if (c == kENCODING_NONE && p == 0) {
1650  break; // here and below `break` means supported element type
1651  // for extension functions
1652  }
1653  case kPOINT:
1654  case kLINESTRING:
1655  case kPOLYGON:
1656  case kMULTIPOINT:
1657  case kMULTILINESTRING:
1658  case kMULTIPOLYGON:
1659  if (c == kENCODING_NONE && p == 0) {
1660  break;
1661  }
1662  if (c == kENCODING_GEOINT && p == 32) {
1663  break;
1664  }
1665  case kTEXT:
1666  case kVARCHAR:
1667  elem_type = kTEXT;
1668  if (c == kENCODING_DICT) {
1669  break;
1670  }
1671  case kTIMESTAMP:
1672  if (c == kENCODING_NONE && p == 0 && (d == 9 || d == 6 || d == 0)) {
1673  break;
1674  }
1675  case kARRAY:
1676  elem_type = elem_ti.get_subtype();
1677  if (IS_NUMBER(elem_type) || elem_type == kBOOLEAN || elem_type == kTEXT) {
1678  if (c == kENCODING_NONE && p == 0) {
1679  c = kENCODING_ARRAY;
1680  break;
1681  } else if (c == kENCODING_DICT) {
1683  break;
1684  }
1685  }
1686  default:
1687  elem_type = kNULLT; // indicates unsupported element type that
1688  // the caller needs to handle accordingly
1689  }
1690  auto ti = SQLTypeInfo(kCOLUMN, c, p, elem_type);
1691  ti.set_dimension(d);
1692  if (c == kENCODING_DICT) {
1693  ti.setStringDictKey(elem_ti.getStringDictKey());
1694  }
1695  ti.set_scale(s);
1696  return ti;
1697 }
HOST DEVICE SQLTypes get_subtype() const
Definition: sqltypes.h:392
SQLTypes
Definition: sqltypes.h:65
HOST DEVICE int get_scale() const
Definition: sqltypes.h:396
HOST DEVICE void set_subtype(SQLTypes st)
Definition: sqltypes.h:469
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:391
Definition: sqltypes.h:79
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:399
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:393
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:402
Definition: sqltypes.h:72
#define IS_NUMBER(T)
Definition: sqltypes.h:306
const shared::StringDictKey & getStringDictKey() const
Definition: sqltypes.h:1055

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool geo_promoted_type_match ( const SQLTypes  a,
const SQLTypes  b 
)
inline

Definition at line 2029 of file sqltypes.h.

References kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kPOINT, and kPOLYGON.

Referenced by Parser::InsertValuesStmt::analyze(), Geospatial::GeoTypesFactory::getGeoColumns(), import_export::import_thread_delimited(), import_export::import_thread_shapefile(), foreign_storage::TextFileBufferParser::processGeoColumn(), and foreign_storage::GeospatialEncoder::processGeoElement().

2029  {
2030  return (a == b) || (a == kPOINT && b == kMULTIPOINT) ||
2031  (a == kLINESTRING && b == kMULTILINESTRING) ||
2032  (a == kPOLYGON && b == kMULTIPOLYGON);
2033 }
constexpr double a
Definition: Utm.h:32

+ Here is the caller graph for this function:

SQLTypes get_int_type_by_size ( size_t const  nbytes)
inline

Definition at line 1452 of file sqltypes.h.

References kBIGINT, kINT, kSMALLINT, kTINYINT, and UNREACHABLE.

Referenced by WindowFunctionContext::buildAggregationTreeForPartition(), anonymous_namespace{RelAlgExecutor.cpp}::anonymous_namespace{RelAlgExecutor.cpp}::conditionally_change_arg_to_int_type(), and decimal_to_int_type().

1452  {
1453  switch (nbytes) {
1454  case 1:
1455  return kTINYINT;
1456  case 2:
1457  return kSMALLINT;
1458  case 4:
1459  return kINT;
1460  case 8:
1461  return kBIGINT;
1462  default:
1463 #if !(defined(__CUDACC__) || defined(NO_BOOST))
1464  UNREACHABLE() << "Invalid number of bytes=" << nbytes;
1465 #endif
1466  return {};
1467  }
1468 }
#define UNREACHABLE()
Definition: Logger.h:338
Definition: sqltypes.h:72

+ Here is the caller graph for this function:

SQLTypeInfo get_logical_type_info ( const SQLTypeInfo type_info)
inline

Definition at line 1470 of file sqltypes.h.

References SQLTypeInfo::get_compression(), SQLTypeInfo::get_type(), kARRAY, kENCODING_DATE_IN_DAYS, kENCODING_FIXED, kENCODING_NONE, and SQLTypeInfo::set_compression().

Referenced by anonymous_namespace{ColumnFetcher.cpp}::columnarize_result(), anonymous_namespace{ColumnarResults.cpp}::fixed_encoding_nullable_val(), anonymous_namespace{RelAlgExecutor.cpp}::get_logical_type_for_expr(), anonymous_namespace{TypedDataAccessors.h}::NullSentinelSupplier::get_null_sentinel_for_type(), get_nullable_logical_type_info(), target_info::get_target_info_impl(), TableOptimizer::getDeletedColumnStats(), PerfectJoinHashTable::getHashJoinArgs(), getLeafColumnRange(), Parser::CaseExpr::normalize(), TableOptimizer::recomputeColumnMetadata(), Fragmenter_Namespace::InsertOrderFragmenter::updateChunkStats(), and Fragmenter_Namespace::InsertOrderFragmenter::updateColumns().

1470  {
1471  EncodingType encoding = type_info.get_compression();
1472  if (encoding == kENCODING_DATE_IN_DAYS ||
1473  (encoding == kENCODING_FIXED && type_info.get_type() != kARRAY)) {
1474  encoding = kENCODING_NONE;
1475  }
1476  auto type_info_copy = type_info;
1477  type_info_copy.set_compression(encoding);
1478  type_info_copy.setStorageSize();
1479  return type_info_copy;
1480 }
void set_compression(EncodingType c)
Definition: sqltypes.h:479
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:391
EncodingType
Definition: sqltypes.h:240
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:399

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

null_value_t get_null_value ( const SQLTypeInfo ti)
inline

Definition at line 1891 of file sqltypes.h.

References CHECK_EQ, SQLTypeInfo::get_compression(), SQLTypeInfo::get_logical_size(), SQLTypeInfo::get_subtype(), SQLTypeInfo::get_type(), kARRAY, kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kDOUBLE, kENCODING_DICT, kENCODING_GEOINT, kENCODING_NONE, kFLOAT, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kNUMERIC, kPOINT, kPOLYGON, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, NULL_ARRAY_BIGINT, NULL_ARRAY_BOOLEAN, NULL_ARRAY_COMPRESSED_32, NULL_ARRAY_DOUBLE, NULL_ARRAY_FLOAT, NULL_ARRAY_INT, NULL_ARRAY_SMALLINT, NULL_ARRAY_TINYINT, NULL_BIGINT, NULL_BOOLEAN, NULL_DOUBLE, NULL_FLOAT, NULL_INT, NULL_SMALLINT, NULL_TINYINT, and UNREACHABLE.

1891  {
1892  null_value_t null_value{};
1893  switch (ti.get_type()) {
1894  case kBOOLEAN:
1895  null_value.i8 = NULL_BOOLEAN;
1896  break;
1897  case kTINYINT:
1898  null_value.i8 = NULL_TINYINT;
1899  break;
1900  case kSMALLINT:
1901  null_value.i16 = NULL_SMALLINT;
1902  break;
1903  case kINT:
1904  null_value.i32 = NULL_INT;
1905  break;
1906  case kBIGINT:
1907  null_value.i64 = NULL_BIGINT;
1908  break;
1909  case kFLOAT:
1910  null_value.f32 = NULL_FLOAT;
1911  break;
1912  case kDOUBLE:
1913  null_value.f64 = NULL_DOUBLE;
1914  break;
1915  case kPOINT:
1916  case kMULTIPOINT:
1917  case kLINESTRING:
1918  case kMULTILINESTRING:
1919  case kPOLYGON:
1920  case kMULTIPOLYGON:
1921  if (ti.get_compression() == kENCODING_GEOINT) {
1922  null_value.geoint[0] = null_value.geoint[1] = NULL_ARRAY_COMPRESSED_32;
1923  } else if (ti.get_compression() == kENCODING_NONE) {
1924  null_value.geodouble[0] = null_value.geodouble[1] = NULL_ARRAY_DOUBLE;
1925  } else {
1926  UNREACHABLE();
1927  }
1928  break;
1929  case kARRAY:
1930  switch (ti.get_subtype()) {
1931  case kBOOLEAN:
1932  null_value.i8 = NULL_ARRAY_BOOLEAN;
1933  break;
1934  case kTINYINT:
1935  null_value.i8 = NULL_ARRAY_TINYINT;
1936  break;
1937  case kSMALLINT:
1938  null_value.i16 = NULL_ARRAY_SMALLINT;
1939  break;
1940  case kINT:
1941  null_value.i32 = NULL_ARRAY_INT;
1942  break;
1943  case kTIMESTAMP:
1944  case kTIME:
1945  case kDATE:
1946  case kINTERVAL_DAY_TIME:
1947  case kINTERVAL_YEAR_MONTH:
1948  case kDECIMAL:
1949  case kNUMERIC:
1950  case kBIGINT:
1951  null_value.i64 = NULL_ARRAY_BIGINT;
1952  break;
1953  case kFLOAT:
1954  null_value.f32 = NULL_ARRAY_FLOAT;
1955  break;
1956  case kDOUBLE:
1957  null_value.f64 = NULL_ARRAY_FLOAT;
1958  break;
1959  case kTEXT:
1960  if (ti.get_compression() == kENCODING_DICT) {
1961  CHECK_EQ(ti.get_logical_size(), 4);
1962  null_value.i32 = NULL_ARRAY_COMPRESSED_32;
1963  } else if (ti.get_compression() == kENCODING_NONE) {
1964  null_value.i8 = NULL_ARRAY_TINYINT;
1965  } else {
1966  UNREACHABLE();
1967  }
1968  break;
1969  default:
1970  UNREACHABLE();
1971  break;
1972  }
1973  break;
1974  case kTEXT:
1975  if (ti.get_compression() == kENCODING_DICT) {
1976  CHECK_EQ(ti.get_logical_size(), 4);
1977  null_value.i32 = NULL_INT;
1978  } else if (ti.get_compression() == kENCODING_NONE) {
1979  null_value.i32 = NULL_TINYINT;
1980  } else {
1981  UNREACHABLE();
1982  }
1983  break;
1984  default:
1985  UNREACHABLE();
1986  break;
1987  }
1988  return null_value;
1989 }
HOST DEVICE SQLTypes get_subtype() const
Definition: sqltypes.h:392
#define CHECK_EQ(x, y)
Definition: Logger.h:301
#define NULL_DOUBLE
Definition: sqltypes.h:76
#define NULL_ARRAY_INT
#define NULL_FLOAT
#define NULL_BIGINT
#define NULL_ARRAY_SMALLINT
#define UNREACHABLE()
Definition: Logger.h:338
#define NULL_ARRAY_TINYINT
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:391
#define NULL_INT
int get_logical_size() const
Definition: sqltypes.h:419
#define NULL_ARRAY_COMPRESSED_32
#define NULL_ARRAY_FLOAT
#define NULL_BOOLEAN
Definition: sqltypes.h:79
Definition: sqltypes.h:80
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:399
#define NULL_TINYINT
#define NULL_ARRAY_DOUBLE
#define NULL_SMALLINT
#define NULL_ARRAY_BIGINT
Definition: sqltypes.h:72
#define NULL_ARRAY_BOOLEAN

+ Here is the call graph for this function:

SQLTypeInfo get_nullable_logical_type_info ( const SQLTypeInfo type_info)
inline

Definition at line 1488 of file sqltypes.h.

References get_logical_type_info(), and get_nullable_type_info().

Referenced by anonymous_namespace{RelAlgExecutor.cpp}::get_logical_type_for_expr(), and RelAlgTranslator::translateArrayFunction().

1488  {
1489  SQLTypeInfo nullable_type_info = get_logical_type_info(type_info);
1490  return get_nullable_type_info(nullable_type_info);
1491 }
SQLTypeInfo get_logical_type_info(const SQLTypeInfo &type_info)
Definition: sqltypes.h:1470
SQLTypeInfo get_nullable_type_info(const SQLTypeInfo &type_info)
Definition: sqltypes.h:1482

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

SQLTypeInfo get_nullable_type_info ( const SQLTypeInfo type_info)
inline

Definition at line 1482 of file sqltypes.h.

References SQLTypeInfo::set_notnull().

Referenced by CodeGenerator::createInValuesBitmap(), Analyzer::Constant::do_cast(), and get_nullable_logical_type_info().

1482  {
1483  SQLTypeInfo nullable_type_info = type_info;
1484  nullable_type_info.set_notnull(false);
1485  return nullable_type_info;
1486 }
void set_notnull(bool n)
Definition: sqltypes.h:475

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void getFlatBufferNDimsAndSizes ( const int64_t  items_count,
const int64_t  max_nof_values,
const SQLTypeInfo ti,
size_t &  ndims,
int64_t &  max_nof_sizes 
)
inline

Definition at line 1787 of file sqltypes.h.

References SQLTypeInfo::get_compression(), SQLTypeInfo::get_subtype(), SQLTypeInfo::get_type(), kARRAY, kENCODING_DICT, kENCODING_NONE, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kPOINT, kPOLYGON, kTEXT, and UNREACHABLE.

Referenced by getFlatBufferSize(), and initializeFlatBuffer().

1791  {
1792  ndims = 0;
1793  max_nof_sizes = 0;
1794  switch (ti.get_type()) {
1795  case kPOINT:
1796  ndims = 0;
1797  break;
1798  case kARRAY:
1799  if (ti.get_subtype() == kTEXT && ti.get_compression() == kENCODING_NONE) {
1800  ndims = 2;
1801  max_nof_sizes = items_count + 2 * max_nof_values / 3;
1802  } else {
1803  ndims = 1;
1804  max_nof_sizes = items_count + max_nof_values / 3;
1805  }
1806  break;
1807  case kLINESTRING:
1808  case kMULTIPOINT:
1809  ndims = 1;
1810  max_nof_sizes = items_count + max_nof_values / 3;
1811  break;
1812  case kPOLYGON:
1813  case kMULTILINESTRING:
1814  ndims = 2;
1815  max_nof_sizes = items_count + 2 * max_nof_values / 3;
1816  break;
1817  case kMULTIPOLYGON:
1818  ndims = 3;
1819  max_nof_sizes = items_count + max_nof_values;
1820  break;
1821  case kTEXT:
1822  switch (ti.get_compression()) {
1823  case kENCODING_NONE:
1824  ndims = 1;
1825  max_nof_sizes = items_count + max_nof_values / 3;
1826  break;
1827  case kENCODING_DICT:
1828  ndims = 0;
1829  break;
1830  default:
1831  UNREACHABLE();
1832  }
1833  break;
1834  default:
1835  UNREACHABLE();
1836  }
1837 }
HOST DEVICE SQLTypes get_subtype() const
Definition: sqltypes.h:392
#define UNREACHABLE()
Definition: Logger.h:338
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:391
Definition: sqltypes.h:79
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:399

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int64_t getFlatBufferSize ( int64_t  items_count,
int64_t  max_nof_values,
const SQLTypeInfo ti 
)
inline

Definition at line 1839 of file sqltypes.h.

References FlatBufferManager::compute_flatbuffer_size(), FlatBufferManager::computeBufferSizeNestedArray(), GeoPointFormatId, SQLTypeInfo::get_compression(), SQLTypeInfo::get_input_srid(), SQLTypeInfo::get_output_srid(), SQLTypeInfo::get_type(), getFlatBufferNDimsAndSizes(), kENCODING_GEOINT, kPOINT, and SQLTypeInfo::toValueType().

Referenced by TableFunctionManager::allocate_output_buffers(), and ColumnarResults::ColumnarResults().

1841  {
1842  if (ti.get_type() == kPOINT) {
1843  // to be deprecated
1844  FlatBufferManager::GeoPoint metadata{items_count,
1845  ti.get_input_srid(),
1846  ti.get_output_srid(),
1849  GeoPointFormatId, reinterpret_cast<const int8_t*>(&metadata));
1850  } else {
1851  size_t ndims = 0;
1852  int64_t max_nof_sizes = 0;
1853  getFlatBufferNDimsAndSizes(items_count, max_nof_values, ti, ndims, max_nof_sizes);
1855  /* ndims= */ ndims,
1856  /* total_items_count= */ items_count,
1857  /* total sizes count= */ max_nof_sizes,
1858  /* total values count= */ max_nof_values,
1859  ti.toValueType(),
1860  /* user data size= */ sizeof(SQLTypeInfoLite));
1861  }
1862 }
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:391
FlatBufferManager::ValueType toValueType() const
Definition: sqltypes.h:1225
static int64_t compute_flatbuffer_size(FlatBufferFormat format_id, const int8_t *format_metadata_ptr)
Definition: FlatBuffer.h:639
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:399
static int64_t computeBufferSizeNestedArray(int64_t ndims, int64_t total_items_count, int64_t total_sizes_count, int64_t total_values_count, ValueType value_type, size_t user_data_size)
Definition: FlatBuffer.h:718
void getFlatBufferNDimsAndSizes(const int64_t items_count, const int64_t max_nof_values, const SQLTypeInfo &ti, size_t &ndims, int64_t &max_nof_sizes)
Definition: sqltypes.h:1787
HOST DEVICE int get_input_srid() const
Definition: sqltypes.h:395
HOST DEVICE int get_output_srid() const
Definition: sqltypes.h:397

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void initializeFlatBuffer ( FlatBufferManager m,
int64_t  items_count,
int64_t  max_nof_values,
const SQLTypeInfo ti 
)
inline

Definition at line 1991 of file sqltypes.h.

References CHECK_EQ, GeoPointFormatId, SQLTypeInfo::get_compression(), SQLTypeInfo::get_input_srid(), get_null_value(), SQLTypeInfo::get_output_srid(), SQLTypeInfo::get_type(), getFlatBufferNDimsAndSizes(), null_value_t::i8, FlatBufferManager::initialize(), FlatBufferManager::initializeNestedArray(), kENCODING_GEOINT, kPOINT, FlatBufferManager::Success, SQLTypeInfo::toLite(), and SQLTypeInfo::toValueType().

Referenced by TableFunctionManager::allocate_output_buffers(), and ColumnarResults::ColumnarResults().

1994  {
1995  if (ti.get_type() == kPOINT) {
1996  // to be deprecated
1997  FlatBufferManager::GeoPoint metadata{items_count,
1998  ti.get_input_srid(),
1999  ti.get_output_srid(),
2001  m.initialize(GeoPointFormatId, reinterpret_cast<const int8_t*>(&metadata));
2002  } else {
2003  size_t ndims = 0;
2004  int64_t max_nof_sizes = 0;
2005  getFlatBufferNDimsAndSizes(items_count, max_nof_values, ti, ndims, max_nof_sizes);
2006  SQLTypeInfoLite ti_lite = ti.toLite();
2007  null_value_t null_value = get_null_value(ti);
2008  int8_t* null_value_ptr = &null_value.i8;
2009  auto status = m.initializeNestedArray(
2010  /* ndims= */ ndims,
2011  /* total_items_count= */ items_count,
2012  /* total_sizes_count= */ max_nof_sizes,
2013  /* total_values_count= */ max_nof_values,
2014  ti.toValueType(),
2015  /* null value buffer=*/null_value_ptr, // null value buffer size
2016  // is defined by value type
2017  /* user data buffer=*/reinterpret_cast<const int8_t*>(&ti_lite),
2018  /* user data buffer size=*/sizeof(SQLTypeInfoLite));
2020  }
2021 }
#define CHECK_EQ(x, y)
Definition: Logger.h:301
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:391
void initialize(FlatBufferFormat format_id, const int8_t *format_metadata_ptr)
Definition: FlatBuffer.h:833
FlatBufferManager::ValueType toValueType() const
Definition: sqltypes.h:1225
int8_t i8
Definition: sqltypes.h:1866
SQLTypeInfoLite toLite() const
Definition: sqltypes.h:1107
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:399
Status initializeNestedArray(int64_t ndims, int64_t total_items_count, int64_t total_sizes_count, int64_t total_values_count, ValueType value_type, const int8_t *null_value_ptr, const int8_t *user_data_ptr, size_t user_data_size)
Definition: FlatBuffer.h:743
void getFlatBufferNDimsAndSizes(const int64_t items_count, const int64_t max_nof_values, const SQLTypeInfo &ti, size_t &ndims, int64_t &max_nof_sizes)
Definition: sqltypes.h:1787
HOST DEVICE int get_input_srid() const
Definition: sqltypes.h:395
V get_null_value()
HOST DEVICE int get_output_srid() const
Definition: sqltypes.h:397

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

DEVICE constexpr bool is_cuda_compiler ( )
inline

Definition at line 220 of file sqltypes.h.

220  {
221 #ifdef __CUDACC__
222  return true;
223 #else
224  return false;
225 #endif
226 }
constexpr auto is_datetime ( SQLTypes  type)

Definition at line 325 of file sqltypes.h.

References kDATE, kTIME, and kTIMESTAMP.

Referenced by ColumnDescriptor::getDefaultValueLiteral(), SQLTypeInfo::is_time(), ArrowForeignStorageBase::replaceNullValues(), RexLiteral::RexLiteral(), and ddl_utils::validate_and_set_fixed_encoding().

325  {
326  return type == kTIME || type == kTIMESTAMP || type == kDATE;
327 }
Definition: sqltypes.h:76
Definition: sqltypes.h:80

+ Here is the caller graph for this function:

bool IsNullDatum ( const Datum  d,
const SQLTypeInfo ti 
)

Definition at line 331 of file Datum.cpp.

References DatumEqual(), and NullDatum().

Referenced by anonymous_namespace{ExpressionRewrite.cpp}::ConstantFoldingVisitor::visitStringOper().

331  {
332  const Datum null_datum = NullDatum(ti);
333  return DatumEqual(datum, null_datum, ti);
334 }
bool DatumEqual(const Datum a, const Datum b, const SQLTypeInfo &ti)
Definition: Datum.cpp:408
Datum NullDatum(const SQLTypeInfo &ti)
Definition: Datum.cpp:288
Definition: Datum.h:69

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Datum NullDatum ( const SQLTypeInfo ti)

Definition at line 288 of file Datum.cpp.

References Datum::bigintval, Datum::boolval, Datum::doubleval, Datum::floatval, import_export::anonymous_namespace{Importer.cpp}::get_type_for_datum(), inline_fixed_encoding_null_val(), Datum::intval, kBIGINT, kBOOLEAN, kDATE, kDOUBLE, kFLOAT, kINT, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kPOINT, kPOLYGON, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, NULL_DOUBLE, NULL_FLOAT, Datum::smallintval, Datum::tinyintval, and run_benchmark_import::type.

Referenced by StringOps_Namespace::compute_jaro_winkler_score(), IsNullDatum(), import_export::NullArray(), and import_export::StringToArray().

288  {
289  Datum d;
290  const auto type = get_type_for_datum(ti);
291  switch (type) {
292  case kBOOLEAN:
294  break;
295  case kBIGINT:
297  break;
298  case kINT:
300  break;
301  case kSMALLINT:
303  break;
304  case kTINYINT:
306  break;
307  case kFLOAT:
308  d.floatval = NULL_FLOAT;
309  break;
310  case kDOUBLE:
312  break;
313  case kTIME:
314  case kTIMESTAMP:
315  case kDATE:
317  break;
318  case kPOINT:
319  case kMULTIPOINT:
320  case kLINESTRING:
321  case kMULTILINESTRING:
322  case kPOLYGON:
323  case kMULTIPOLYGON:
324  throw std::runtime_error("Internal error: geometry type in NullDatum.");
325  default:
326  throw std::runtime_error("Internal error: invalid type in NullDatum.");
327  }
328  return d;
329 }
int8_t tinyintval
Definition: Datum.h:71
#define NULL_DOUBLE
Definition: sqltypes.h:76
#define NULL_FLOAT
int8_t boolval
Definition: Datum.h:70
int32_t intval
Definition: Datum.h:73
float floatval
Definition: Datum.h:75
int64_t bigintval
Definition: Datum.h:74
int16_t smallintval
Definition: Datum.h:72
Definition: sqltypes.h:80
int64_t inline_fixed_encoding_null_val(const SQL_TYPE_INFO &ti)
Definition: sqltypes.h:72
SQLTypes get_type_for_datum(const SQLTypeInfo &ti)
Definition: Importer.cpp:260
Definition: Datum.h:69
double doubleval
Definition: Datum.h:76

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::ostream& operator<< ( std::ostream &  os,
SQLTypes const  sql_type 
)
inline

Definition at line 176 of file sqltypes.h.

References toString().

176  {
177  os << toString(sql_type);
178  return os;
179 }
std::string toString(const QueryDescriptionType &type)
Definition: Types.h:64

+ Here is the call graph for this function:

std::ostream& operator<< ( std::ostream &  os,
EncodingType const  type 
)
inline

Definition at line 256 of file sqltypes.h.

References logger::FATAL, kENCODING_ARRAY, kENCODING_ARRAY_DICT, kENCODING_DATE_IN_DAYS, kENCODING_DICT, kENCODING_DIFF, kENCODING_FIXED, kENCODING_GEOINT, kENCODING_LAST, kENCODING_NONE, kENCODING_RL, kENCODING_SPARSE, LOG, and run_benchmark_import::type.

256  {
257  switch (type) {
258  case kENCODING_NONE:
259  os << "NONE";
260  break;
261  case kENCODING_FIXED:
262  os << "FIXED";
263  break;
264  case kENCODING_RL:
265  os << "RL";
266  break;
267  case kENCODING_DIFF:
268  os << "DIFF";
269  break;
270  case kENCODING_DICT:
271  os << "DICT";
272  break;
273  case kENCODING_SPARSE:
274  os << "SPARSE";
275  break;
276  case kENCODING_GEOINT:
277  os << "GEOINT";
278  break;
280  os << "DATE_IN_DAYS";
281  break;
282  case kENCODING_ARRAY:
283  os << "ARRAY";
284  break;
286  os << "ARRAY_DICT";
287  break;
288  case kENCODING_LAST:
289  break;
290  default:
291  LOG(FATAL) << "Invalid EncodingType: " << type;
292  }
293  return os;
294 }
#define LOG(tag)
Definition: Logger.h:285
std::ostream& operator<< ( std::ostream &  os,
const SQLTypeInfo type_info 
)
inline

Definition at line 1442 of file sqltypes.h.

References toString().

1442  {
1443  os << toString(type_info);
1444  return os;
1445 }
std::string toString(const QueryDescriptionType &type)
Definition: Types.h:64

+ Here is the call graph for this function:

SQLTypes string_dict_to_int_type ( const SQLTypeInfo )

Definition at line 565 of file Datum.cpp.

References CHECK, SQLTypeInfo::get_size(), SQLTypeInfo::is_dict_encoded_string(), kINT, kNULLT, kSMALLINT, kTINYINT, and UNREACHABLE.

Referenced by append_datum(), import_export::anonymous_namespace{Importer.cpp}::get_type_for_datum(), anonymous_namespace{Datum.cpp}::get_type_for_datum(), and foreign_storage::ParquetFixedLengthArrayEncoder::setNullFixedLengthArraySentinel().

565  {
566  CHECK(ti.is_dict_encoded_string());
567  switch (ti.get_size()) {
568  case 1:
569  return kTINYINT;
570  case 2:
571  return kSMALLINT;
572  case 4:
573  return kINT;
574  default:
575  UNREACHABLE() << "Unexpected string dictionary encoding size: " << ti.get_size();
576  }
577  return kNULLT;
578 }
#define UNREACHABLE()
Definition: Logger.h:338
#define CHECK(condition)
Definition: Logger.h:291
Definition: sqltypes.h:72

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Datum StringToDatum ( const std::string_view  s,
SQLTypeInfo ti 
)

Definition at line 339 of file Datum.cpp.

References Datum::bigintval, Datum::boolval, Datum::doubleval, Datum::floatval, SQLTypeInfo::get_dimension(), SQLTypeInfo::get_type(), SQLTypeInfo::get_type_name(), Datum::intval, kARRAY, kBIGINT, kBOOLEAN, kCOLUMN, kCOLUMN_LIST, kDATE, kDECIMAL, kDOUBLE, kFLOAT, kINT, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kNUMERIC, kPOINT, kPOLYGON, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, parse_numeric(), Datum::smallintval, Datum::tinyintval, and to_upper().

Referenced by import_export::TypedImportBuffer::add_value(), import_export::TypedImportBuffer::addDefaultValues(), Parser::FixedPtLiteral::analyze(), Analyzer::Constant::cast_from_string(), data_conversion::StringViewToScalarEncoder< DataType, MetadataType >::convert(), anonymous_namespace{ArrowImporter.h}::ArrowValue< std::string >::operator DATA_TYPE(), populate_TColumn(), import_export::StringToArray(), and ddl_utils::anonymous_namespace{DdlUtils.cpp}::validate_literal().

339  {
340  Datum d;
341  try {
342  switch (ti.get_type()) {
343  case kARRAY:
344  case kCOLUMN:
345  case kCOLUMN_LIST:
346  break;
347  case kBOOLEAN:
348  if (s == "t" || s == "T" || s == "1" || to_upper(std::string(s)) == "TRUE") {
349  d.boolval = true;
350  } else if (s == "f" || s == "F" || s == "0" ||
351  to_upper(std::string(s)) == "FALSE") {
352  d.boolval = false;
353  } else {
354  throw std::runtime_error("Invalid string for boolean " + std::string(s));
355  }
356  break;
357  case kNUMERIC:
358  case kDECIMAL:
359  d.bigintval = parse_numeric(s, ti);
360  break;
361  case kBIGINT:
362  d.bigintval = parseInteger<int64_t>(s, ti);
363  break;
364  case kINT:
365  d.intval = parseInteger<int32_t>(s, ti);
366  break;
367  case kSMALLINT:
368  d.smallintval = parseInteger<int16_t>(s, ti);
369  break;
370  case kTINYINT:
371  d.tinyintval = parseInteger<int8_t>(s, ti);
372  break;
373  case kFLOAT:
374  d.floatval = std::stof(std::string(s));
375  break;
376  case kDOUBLE:
377  d.doubleval = std::stod(std::string(s));
378  break;
379  case kTIME:
380  d.bigintval = dateTimeParse<kTIME>(s, ti.get_dimension());
381  break;
382  case kTIMESTAMP:
383  d.bigintval = dateTimeParse<kTIMESTAMP>(s, ti.get_dimension());
384  break;
385  case kDATE:
386  d.bigintval = dateTimeParse<kDATE>(s, ti.get_dimension());
387  break;
388  case kPOINT:
389  case kMULTIPOINT:
390  case kLINESTRING:
391  case kMULTILINESTRING:
392  case kPOLYGON:
393  case kMULTIPOLYGON:
394  throw std::runtime_error("Internal error: geometry type in StringToDatum.");
395  default:
396  throw std::runtime_error("Internal error: invalid type in StringToDatum: " +
397  ti.get_type_name());
398  }
399  } catch (const std::invalid_argument&) {
400  throw std::runtime_error("Invalid conversion from string to " + ti.get_type_name());
401  } catch (const std::out_of_range&) {
402  throw std::runtime_error("Got out of range error during conversion from string to " +
403  ti.get_type_name());
404  }
405  return d;
406 }
int8_t tinyintval
Definition: Datum.h:71
Definition: sqltypes.h:76
int64_t parse_numeric(const std::string_view s, SQLTypeInfo &ti)
Definition: Datum.cpp:112
int8_t boolval
Definition: Datum.h:70
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:391
int32_t intval
Definition: Datum.h:73
float floatval
Definition: Datum.h:75
int64_t bigintval
Definition: Datum.h:74
int16_t smallintval
Definition: Datum.h:72
std::string to_upper(const std::string &str)
Definition: sqltypes.h:80
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:393
std::string get_type_name() const
Definition: sqltypes.h:482
Definition: sqltypes.h:72
Definition: Datum.h:69
double doubleval
Definition: Datum.h:76

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string toString ( const SQLTypes type)
inline

Definition at line 103 of file sqltypes.h.

References logger::FATAL, kARRAY, kBIGINT, kBOOLEAN, kCHAR, kCOLUMN, kCOLUMN_LIST, kCURSOR, kDATE, kDECIMAL, kDOUBLE, kEVAL_CONTEXT_TYPE, kFLOAT, kGEOGRAPHY, kGEOMETRY, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kNULLT, kNUMERIC, kPOINT, kPOLYGON, kSMALLINT, kSQLTYPE_LAST, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, kVOID, LOG, and run_benchmark_import::type.

103  {
104  switch (type) {
105  case kNULLT:
106  return "NULL";
107  case kBOOLEAN:
108  return "BOOL";
109  case kCHAR:
110  return "CHAR";
111  case kVARCHAR:
112  return "VARCHAR";
113  case kNUMERIC:
114  return "NUMERIC";
115  case kDECIMAL:
116  return "DECIMAL";
117  case kINT:
118  return "INT";
119  case kSMALLINT:
120  return "SMALLINT";
121  case kFLOAT:
122  return "FLOAT";
123  case kDOUBLE:
124  return "DOUBLE";
125  case kTIME:
126  return "TIME";
127  case kTIMESTAMP:
128  return "TIMESTAMP";
129  case kBIGINT:
130  return "BIGINT";
131  case kTEXT:
132  return "TEXT";
133  case kDATE:
134  return "DATE";
135  case kARRAY:
136  return "ARRAY";
137  case kINTERVAL_DAY_TIME:
138  return "DAY TIME INTERVAL";
140  return "YEAR MONTH INTERVAL";
141  case kPOINT:
142  return "POINT";
143  case kMULTIPOINT:
144  return "MULTIPOINT";
145  case kLINESTRING:
146  return "LINESTRING";
147  case kMULTILINESTRING:
148  return "MULTILINESTRING";
149  case kPOLYGON:
150  return "POLYGON";
151  case kMULTIPOLYGON:
152  return "MULTIPOLYGON";
153  case kTINYINT:
154  return "TINYINT";
155  case kGEOMETRY:
156  return "GEOMETRY";
157  case kGEOGRAPHY:
158  return "GEOGRAPHY";
159  case kEVAL_CONTEXT_TYPE:
160  return "UNEVALUATED ANY";
161  case kVOID:
162  return "VOID";
163  case kCURSOR:
164  return "CURSOR";
165  case kCOLUMN:
166  return "COLUMN";
167  case kCOLUMN_LIST:
168  return "COLUMN_LIST";
169  case kSQLTYPE_LAST:
170  break;
171  }
172  LOG(FATAL) << "Invalid SQL type: " << type;
173  return "";
174 }
Definition: sqltypes.h:76
#define LOG(tag)
Definition: Logger.h:285
Definition: sqltypes.h:92
Definition: sqltypes.h:79
Definition: sqltypes.h:80
Definition: sqltypes.h:68
Definition: sqltypes.h:72
std::string toString ( const EncodingType type)
inline

Definition at line 296 of file sqltypes.h.

References run_benchmark_import::type.

296  {
297  std::ostringstream ss;
298  ss << type;
299  return ss.str();
300 }
DEVICE void VarlenArray_get_nth ( int8_t *  buf,
int  n,
ArrayDatum result,
bool *  is_end 
)
inline

Definition at line 1714 of file sqltypes.h.

References CHECK_EQ, FlatBufferManager::NestedArrayItem< NDIM >::is_null, FlatBufferManager::NestedArrayItem< NDIM >::nof_values, and FlatBufferManager::NestedArrayItem< NDIM >::values.

Referenced by ChunkIter_get_nth(), ChunkIter_get_nth_varlen(), and ResultSet::makeVarlenTargetValue().

1717  {
1718  FlatBufferManager m{buf};
1719  FlatBufferManager::Status status{};
1720  if (m.isNestedArray()) {
1722  status = m.getItem(n, item);
1723  if (status == FlatBufferManager::Status::Success) {
1724  result->length = item.nof_values * m.getValueSize();
1725  result->pointer = item.values;
1726  result->is_null = item.is_null;
1727  *is_end = false;
1728  } else {
1729  result->length = 0;
1730  result->pointer = NULL;
1731  result->is_null = true;
1732  *is_end = true;
1733 #ifndef __CUDACC__
1734  // out of range indexing is equivalent to returning NULL (SQL AT)
1735  CHECK_EQ(status, FlatBufferManager::Status::ItemUnspecifiedError);
1736 #endif
1737  }
1738  } else {
1739  // to be deprecated
1740  auto status = m.getItemOld(n, result->length, result->pointer, result->is_null);
1741  if (status == FlatBufferManager::Status::IndexError) {
1742  *is_end = true;
1743  result->length = 0;
1744  result->pointer = NULL;
1745  result->is_null = true;
1746  } else {
1747  *is_end = false;
1748 #ifndef __CUDACC__
1749  CHECK_EQ(status, FlatBufferManager::Status::Success);
1750 #endif
1751  }
1752  }
1753 }
#define CHECK_EQ(x, y)
Definition: Logger.h:301
constexpr double n
Definition: Utm.h:38

+ Here is the caller graph for this function:

DEVICE void VarlenArray_get_nth ( int8_t *  buf,
int  n,
bool  uncompress,
VarlenDatum result,
bool *  is_end 
)
inline

Definition at line 1755 of file sqltypes.h.

References CHECK, CHECK_EQ, VarlenDatum::is_null, VarlenDatum::length, and VarlenDatum::pointer.

1759  {
1760  FlatBufferManager m{buf};
1761  FlatBufferManager::Status status{};
1762 #ifndef __CUDACC__
1763  CHECK(m.isNestedArray());
1764 #endif
1766  status = m.getItem(n, item);
1767  if (status == FlatBufferManager::Status::Success) {
1768  result->length = item.nof_values * m.getValueSize();
1769  result->pointer = item.values;
1770  result->is_null = item.is_null;
1771  *is_end = false;
1772 #ifndef __CUDACC__
1773  CHECK(!uncompress); // NOT IMPLEMENTED
1774 #endif
1775  } else {
1776  result->length = 0;
1777  result->pointer = NULL;
1778  result->is_null = true;
1779  *is_end = true;
1780 #ifndef __CUDACC__
1781  // out of range indexing is equivalent to returning NULL (SQL AT)
1782  CHECK_EQ(status, FlatBufferManager::Status::IndexError);
1783 #endif
1784  }
1785 }
#define CHECK_EQ(x, y)
Definition: Logger.h:301
bool is_null
Definition: Datum.h:57
int8_t * pointer
Definition: Datum.h:56
#define CHECK(condition)
Definition: Logger.h:291
constexpr double n
Definition: Utm.h:38
size_t length
Definition: Datum.h:55