OmniSciDB  c07336695a
SQLTypeInfoCore< TYPE_FACET_PACK > Class Template Reference

#include <sqltypes.h>

+ Inheritance diagram for SQLTypeInfoCore< TYPE_FACET_PACK >:
+ Collaboration diagram for SQLTypeInfoCore< TYPE_FACET_PACK >:

Public Member Functions

 SQLTypeInfoCore (SQLTypes t, int d, int s, bool n, EncodingType c, int p, SQLTypes st)
 
 SQLTypeInfoCore (SQLTypes t, int d, int s, bool n)
 
 SQLTypeInfoCore (SQLTypes t, int d, int s)
 
 SQLTypeInfoCore (SQLTypes t, bool n)
 
 SQLTypeInfoCore (SQLTypes t)
 
 SQLTypeInfoCore (SQLTypes t, bool n, EncodingType c)
 
 SQLTypeInfoCore ()
 
HOST DEVICE SQLTypes get_type () const
 
HOST DEVICE SQLTypes get_subtype () const
 
HOST DEVICE int get_dimension () const
 
int get_precision () const
 
HOST DEVICE int get_input_srid () const
 
HOST DEVICE int get_scale () const
 
HOST DEVICE int get_output_srid () const
 
HOST DEVICE bool get_notnull () const
 
HOST DEVICE EncodingType get_compression () const
 
HOST DEVICE int get_comp_param () const
 
HOST DEVICE int get_size () const
 
int get_logical_size () const
 
int get_physical_cols () const
 
int get_physical_coord_cols () const
 
bool has_bounds () const
 
bool has_render_group () const
 
HOST DEVICE void set_type (SQLTypes t)
 
HOST DEVICE void set_subtype (SQLTypes st)
 
void set_dimension (int d)
 
void set_precision (int d)
 
void set_input_srid (int d)
 
void set_scale (int s)
 
void set_output_srid (int s)
 
void set_notnull (bool n)
 
void set_size (int s)
 
void set_fixed_size ()
 
void set_compression (EncodingType c)
 
void set_comp_param (int p)
 
std::string get_type_name () const
 
std::string get_compression_name () const
 
bool is_string () const
 
bool is_string_array () const
 
bool is_integer () const
 
bool is_decimal () const
 
bool is_fp () const
 
bool is_number () const
 
bool is_time () const
 
bool is_boolean () const
 
bool is_array () const
 
bool is_varlen_array () const
 
bool is_fixlen_array () const
 
bool is_timeinterval () const
 
bool is_geometry () const
 
bool is_varlen () const
 
bool is_varlen_indeed () const
 
bool is_dict_encoded_string () const
 
HOST DEVICE bool operator!= (const SQLTypeInfoCore &rhs) const
 
HOST DEVICE bool operator== (const SQLTypeInfoCore &rhs) const
 
HOST DEVICE SQLTypeInfoCoreoperator= (const SQLTypeInfoCore &rhs)
 
bool is_castable (const SQLTypeInfoCore &new_type_info) const
 
HOST DEVICE bool is_null (const Datum &d) const
 
HOST DEVICE bool is_null (const int8_t *val) const
 
HOST DEVICE bool is_null_fixlen_array (const int8_t *val, int array_size) const
 
SQLTypeInfoCore get_elem_type () const
 
SQLTypeInfoCore get_array_type () const
 

Private Member Functions

HOST DEVICE int get_storage_size () const
 

Private Attributes

SQLTypes type
 
SQLTypes subtype
 
int dimension
 
int scale
 
bool notnull
 
EncodingType compression
 
int comp_param
 
int size
 

Static Private Attributes

static std::string type_name [kSQLTYPE_LAST]
 
static std::string comp_name [kENCODING_LAST]
 

Detailed Description

template<template< class > class... TYPE_FACET_PACK>
class SQLTypeInfoCore< TYPE_FACET_PACK >

Definition at line 269 of file sqltypes.h.

Constructor & Destructor Documentation

◆ SQLTypeInfoCore() [1/7]

template<template< class > class... TYPE_FACET_PACK>
SQLTypeInfoCore< TYPE_FACET_PACK >::SQLTypeInfoCore ( SQLTypes  t,
int  d,
int  s,
bool  n,
EncodingType  c,
int  p,
SQLTypes  st 
)
inline

Definition at line 271 of file sqltypes.h.

272  : type(t)
273  , subtype(st)
274  , dimension(d)
275  , scale(s)
276  , notnull(n)
277  , compression(c)
278  , comp_param(p)
279  , size(get_storage_size()) {}
void d(const SQLTypes expected_type, const std::string &str)
Definition: ImportTest.cpp:268
void c(const std::string &query_string, const ExecutorDeviceType device_type)
HOST DEVICE int get_storage_size() const
Definition: sqltypes.h:650
SQLTypes subtype
Definition: sqltypes.h:639
SQLTypes type
Definition: sqltypes.h:638
EncodingType compression
Definition: sqltypes.h:643

◆ SQLTypeInfoCore() [2/7]

template<template< class > class... TYPE_FACET_PACK>
SQLTypeInfoCore< TYPE_FACET_PACK >::SQLTypeInfoCore ( SQLTypes  t,
int  d,
int  s,
bool  n 
)
inline

Definition at line 280 of file sqltypes.h.

281  : type(t)
282  , subtype(kNULLT)
283  , dimension(d)
284  , scale(s)
285  , notnull(n)
287  , comp_param(0)
288  , size(get_storage_size()) {}
void d(const SQLTypes expected_type, const std::string &str)
Definition: ImportTest.cpp:268
HOST DEVICE int get_storage_size() const
Definition: sqltypes.h:650
SQLTypes subtype
Definition: sqltypes.h:639
SQLTypes type
Definition: sqltypes.h:638
EncodingType compression
Definition: sqltypes.h:643

◆ SQLTypeInfoCore() [3/7]

template<template< class > class... TYPE_FACET_PACK>
SQLTypeInfoCore< TYPE_FACET_PACK >::SQLTypeInfoCore ( SQLTypes  t,
int  d,
int  s 
)
inline

Definition at line 289 of file sqltypes.h.

289 : SQLTypeInfoCore(t, d, s, false) {}
void d(const SQLTypes expected_type, const std::string &str)
Definition: ImportTest.cpp:268

◆ SQLTypeInfoCore() [4/7]

template<template< class > class... TYPE_FACET_PACK>
SQLTypeInfoCore< TYPE_FACET_PACK >::SQLTypeInfoCore ( SQLTypes  t,
bool  n 
)
inline

Definition at line 290 of file sqltypes.h.

291  : type(t)
292  , subtype(kNULLT)
293  , dimension(0)
294  , scale(0)
295  , notnull(n)
297  , comp_param(0)
298  , size(get_storage_size()) {}
HOST DEVICE int get_storage_size() const
Definition: sqltypes.h:650
SQLTypes subtype
Definition: sqltypes.h:639
SQLTypes type
Definition: sqltypes.h:638
EncodingType compression
Definition: sqltypes.h:643

◆ SQLTypeInfoCore() [5/7]

template<template< class > class... TYPE_FACET_PACK>
SQLTypeInfoCore< TYPE_FACET_PACK >::SQLTypeInfoCore ( SQLTypes  t)
inline

Definition at line 299 of file sqltypes.h.

299 : SQLTypeInfoCore(t, false) {}

◆ SQLTypeInfoCore() [6/7]

template<template< class > class... TYPE_FACET_PACK>
SQLTypeInfoCore< TYPE_FACET_PACK >::SQLTypeInfoCore ( SQLTypes  t,
bool  n,
EncodingType  c 
)
inline

Definition at line 300 of file sqltypes.h.

301  : type(t)
302  , subtype(kNULLT)
303  , dimension(0)
304  , scale(0)
305  , notnull(n)
306  , compression(c)
307  , comp_param(0)
308  , size(get_storage_size()) {}
void c(const std::string &query_string, const ExecutorDeviceType device_type)
HOST DEVICE int get_storage_size() const
Definition: sqltypes.h:650
SQLTypes subtype
Definition: sqltypes.h:639
SQLTypes type
Definition: sqltypes.h:638
EncodingType compression
Definition: sqltypes.h:643

◆ SQLTypeInfoCore() [7/7]

template<template< class > class... TYPE_FACET_PACK>
SQLTypeInfoCore< TYPE_FACET_PACK >::SQLTypeInfoCore ( )
inline

Definition at line 309 of file sqltypes.h.

310  : type(kNULLT)
311  , subtype(kNULLT)
312  , dimension(0)
313  , scale(0)
314  , notnull(false)
316  , comp_param(0)
317  , size(0) {}
SQLTypes subtype
Definition: sqltypes.h:639
SQLTypes type
Definition: sqltypes.h:638
EncodingType compression
Definition: sqltypes.h:643

Member Function Documentation

◆ get_array_type()

template<template< class > class... TYPE_FACET_PACK>
SQLTypeInfoCore SQLTypeInfoCore< TYPE_FACET_PACK >::get_array_type ( ) const
inline

Definition at line 632 of file sqltypes.h.

Referenced by Parser::OperExpr::normalize().

632  {
633  return SQLTypeInfoCore(
635  }
SQLTypes type
Definition: sqltypes.h:638
EncodingType compression
Definition: sqltypes.h:643
+ Here is the caller graph for this function:

◆ get_comp_param()

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE int SQLTypeInfoCore< TYPE_FACET_PACK >::get_comp_param ( ) const
inline

Definition at line 328 of file sqltypes.h.

Referenced by Analyzer::Expr::add_cast(), Analyzer::UOper::add_cast(), Analyzer::CaseExpr::add_cast(), Catalog_Namespace::Catalog::addColumn(), Catalog_Namespace::Catalog::addReferenceToForeignDict(), Analyzer::BinOper::common_string_type(), Importer_NS::compress_coord(), Importer_NS::compress_coords(), DictionaryConverterFactory< TARGET_TYPE >::create(), Encoder::Create(), Catalog_Namespace::Catalog::createTable(), DateDaysOverflowValidator::DateDaysOverflowValidator(), decompress(), Catalog_Namespace::Catalog::delDictionary(), Parser::InsertValuesStmt::determineLeafIndex(), DictionaryValueConverter< TARGET_TYPE >::DictionaryValueConverter(), anonymous_namespace{TypedDataAccessors.h}::get_element_size(), get_logical_type_info(), inline_fixed_encoding_null_val(), anonymous_namespace{Execute.cpp}::insert_one_dict_str(), ResultSet::makeTargetValue(), Parser::OperExpr::normalize(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator!=(), TextConverterFactory::operator()(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator=(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator==(), MapDHandler::populateThriftColumnType(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), Catalog_Namespace::Catalog::removeTableFromMap(), Catalog_Namespace::Catalog::setColumnDictionary(), TEST(), Analyzer::UOper::toString(), RelAlgTranslator::translateBinaryGeoFunction(), RelAlgTranslator::translateUnaryGeoFunction(), ThriftSerializers::type_info_to_thrift(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), and File_Namespace::FileBuffer::writeMetadata().

328 { return comp_param; }
+ Here is the caller graph for this function:

◆ get_compression()

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE EncodingType SQLTypeInfoCore< TYPE_FACET_PACK >::get_compression ( ) const
inline

Definition at line 327 of file sqltypes.h.

Referenced by Analyzer::Expr::add_cast(), Analyzer::Constant::add_cast(), Analyzer::UOper::add_cast(), Analyzer::CaseExpr::add_cast(), Catalog_Namespace::Catalog::addColumn(), Parser::InValues::analyze(), Parser::FunctionRef::analyze(), Parser::QuerySpec::analyze_group_by(), CodeGenerator::castArrayPointer(), ChunkIter_get_next(), ChunkIter_get_nth(), CodeGenerator::codegenCastFromString(), CodeGenerator::codegenCmp(), CodeGenerator::codegenHoistedConstantsLoads(), CodeGenerator::codgenAdjustFixedEncNull(), Analyzer::BinOper::common_string_type(), Importer_NS::compress_coord(), Importer_NS::compress_coords(), Encoder::Create(), Catalog_Namespace::Catalog::createTable(), DatumEqual(), decompress(), Analyzer::Expr::decompress(), Catalog_Namespace::Catalog::delDictionary(), encoding_to_thrift(), Executor::executeSimpleInsert(), extract_from_datum(), ChunkMetadata::fillChunkStats(), anonymous_namespace{ColumnarResults.cpp}::fixed_encoding_nullable_val(), anonymous_namespace{TypedDataAccessors.h}::get_element_size(), anonymous_namespace{TargetExprBuilder.cpp}::get_initial_agg_val(), get_logical_type_info(), Chunk_NS::Chunk::getChunkBuffer(), Parser::InsertIntoTableAsSelectStmt::LocalConnector::getColumnDescriptors(), Chunk_NS::Chunk::getNumElemsForBytesInsertData(), Importer_NS::Loader::getStringDict(), ResultSet::getTargetValueFromBufferRowwise(), Chunk_NS::Chunk::init_encoder(), inline_fixed_encoding_null_val(), inline_int_null_val(), CgenState::inlineIntNull(), FixedLengthArrayNoneEncoder::is_null(), is_real_str_or_array(), is_unsigned_type(), Fragmenter_Namespace::isStringVectorData(), ResultSet::makeTargetValue(), ResultSet::makeVarlenTargetValue(), Parser::OperExpr::normalize(), null_val_bit_pattern(), numeric_type_name(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator!=(), TextConverterFactory::operator()(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator=(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator==(), Parser::InsertIntoTableAsSelectStmt::populateData(), MapDHandler::populateThriftColumnType(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), random_fill(), Catalog_Namespace::Catalog::removeTableFromMap(), scan_chunk(), anonymous_namespace{TableOptimizer.cpp}::set_metadata_from_results(), Parser::DDLStmt::setColumnDescriptor(), Fragmenter_Namespace::sizeOfRawColumn(), GroupByAndAggregate::supportedTypeForGpuSharedMemUsage(), RelAlgTranslator::translateBinaryGeoFunction(), RelAlgTranslator::translateGeoLiteral(), RelAlgTranslator::translateUnaryGeoFunction(), Importer_NS::TypedImportBuffer::TypedImportBuffer(), FixedLengthArrayNoneEncoder::update_elem_stats(), ArrayNoneEncoder::update_elem_stats(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), anonymous_namespace{InputMetadata.cpp}::uses_int_meta(), and File_Namespace::FileBuffer::writeMetadata().

327 { return compression; }
EncodingType compression
Definition: sqltypes.h:643

◆ get_compression_name()

template<template< class > class... TYPE_FACET_PACK>
std::string SQLTypeInfoCore< TYPE_FACET_PACK >::get_compression_name ( ) const
inline

Definition at line 444 of file sqltypes.h.

Referenced by Analyzer::UOper::toString().

444 { return comp_name[(int)compression]; }
static std::string comp_name[kENCODING_LAST]
Definition: sqltypes.h:648
EncodingType compression
Definition: sqltypes.h:643
+ Here is the caller graph for this function:

◆ get_dimension()

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE int SQLTypeInfoCore< TYPE_FACET_PACK >::get_dimension ( ) const
inline

Definition at line 321 of file sqltypes.h.

Referenced by Catalog_Namespace::Catalog::addColumn(), Analyzer::BinOper::analyze_type_info(), Analyzer::Constant::cast_string(), Analyzer::Constant::cast_to_string(), CodeGenerator::codegen(), CodeGenerator::codegenCast(), CodeGenerator::codegenDateTruncHighPrecisionTimestamps(), CodeGenerator::codegenExtractHighPrecisionTimestamps(), CodeGenerator::codgenAdjustFixedEncNull(), Analyzer::BinOper::common_numeric_type(), Analyzer::BinOper::common_string_type(), Catalog_Namespace::Catalog::createTable(), DatumToString(), Analyzer::Expr::decompress(), Analyzer::Constant::do_cast(), anonymous_namespace{TypedDataAccessors.h}::get_element_size(), get_logical_type_info(), anonymous_namespace{ExpressionRange.cpp}::getDateTimePrecisionCastRange(), DateTimeTranslator::getDateTruncConstantValue(), DateTimeTranslator::getExtractFromTimeConstantValue(), TimeGM::my_timegm(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator!=(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator=(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator==(), TimeGM::parse_fractional_seconds(), TimeGM::parse_meridians(), parse_numeric(), Parser::InsertIntoTableAsSelectStmt::populateData(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), random_fill(), StringToDatum(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), and File_Namespace::FileBuffer::writeMetadata().

321 { return dimension; }
+ Here is the caller graph for this function:

◆ get_elem_type()

template<template< class > class... TYPE_FACET_PACK>
SQLTypeInfoCore SQLTypeInfoCore< TYPE_FACET_PACK >::get_elem_type ( ) const
inline

Definition at line 628 of file sqltypes.h.

Referenced by Importer_NS::TypedImportBuffer::add_value(), Parser::FunctionRef::analyze(), anonymous_namespace{ResultSetIteration.cpp}::build_array_target_value(), ArrayColumnDescriptor::check_column_value(), CodeGenerator::codegenFunctionOperCastArgs(), ArrayConverterFactory< ELEMENT_FACTORY >::create(), DateDaysOverflowValidator::DateDaysOverflowValidator(), datum_to_string(), DecimalOverflowValidator::DecimalOverflowValidator(), Analyzer::Constant::do_cast(), Executor::executeSimpleInsert(), getLeafColumnRange(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_castable(), ResultSet::makeVarlenTargetValue(), Importer_NS::NullArray(), NullAwareValidator< INNER_VALIDATOR >::NullAwareValidator(), ArraysConverterFactory::operator()(), Parser::InsertIntoTableAsSelectStmt::populateData(), ResultSetReductionJIT::reduceOneSlot(), ResultSetStorage::reduceOneSlot(), Parser::DDLStmt::setColumnDescriptor(), Importer_NS::StringToArray(), Importer_NS::TDatumToArrayDatum(), Analyzer::Constant::toString(), ThriftSerializers::type_info_to_thrift(), MapDHandler::value_to_thrift(), and MapDHandler::value_to_thrift_column().

628  {
629  return SQLTypeInfoCore(
631  }
SQLTypes subtype
Definition: sqltypes.h:639
EncodingType compression
Definition: sqltypes.h:643
+ Here is the caller graph for this function:

◆ get_input_srid()

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE int SQLTypeInfoCore< TYPE_FACET_PACK >::get_input_srid ( ) const
inline

Definition at line 323 of file sqltypes.h.

Referenced by RelAlgTranslator::translateBinaryGeoFunction(), RelAlgTranslator::translateGeoFunctionArg(), and RelAlgTranslator::translateUnaryGeoFunction().

323 { return dimension; }
+ Here is the caller graph for this function:

◆ get_logical_size()

template<template< class > class... TYPE_FACET_PACK>
int SQLTypeInfoCore< TYPE_FACET_PACK >::get_logical_size ( ) const
inline

Definition at line 330 of file sqltypes.h.

Referenced by CodeGenerator::codegenCastBetweenIntTypes(), CodeGenerator::codegenCastBetweenIntTypesOverflowChecks(), CodeGenerator::codgenAdjustFixedEncNull(), Parser::InsertValuesStmt::determineLeafIndex(), get_agg_initial_val(), inline_int_null_val(), anonymous_namespace{TypedDataAccessors.h}::is_null(), is_unsigned_type(), anonymous_namespace{ExtensionFunctionsBinding.cpp}::match_arguments(), numeric_type_name(), and Fragmenter_Namespace::sizeOfRawColumn().

330  {
333  return ti.get_size();
334  }
335  if (compression == kENCODING_DICT) {
336  return 4;
337  }
338  return get_size();
339  }
HOST DEVICE int get_size() const
Definition: sqltypes.h:329
SQLTypes subtype
Definition: sqltypes.h:639
SQLTypes type
Definition: sqltypes.h:638
EncodingType compression
Definition: sqltypes.h:643
+ Here is the caller graph for this function:

◆ get_notnull()

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE bool SQLTypeInfoCore< TYPE_FACET_PACK >::get_notnull ( ) const
inline

Definition at line 326 of file sqltypes.h.

Referenced by Importer_NS::TypedImportBuffer::add_arrow_values(), Importer_NS::TypedImportBuffer::add_value(), Importer_NS::TypedImportBuffer::add_values(), Catalog_Namespace::Catalog::addColumn(), Parser::InsertValuesStmt::analyze(), Analyzer::BinOper::analyze_type_info(), CodeGenerator::codegen(), CodeGenerator::codegenCast(), CodeGenerator::codegenCastBetweenIntTypes(), CodeGenerator::codegenCastBetweenIntTypesOverflowChecks(), CodeGenerator::codegenCastFromFp(), CodeGenerator::codegenCastToFp(), CodeGenerator::codegenDateTruncHighPrecisionTimestamps(), CodeGenerator::codegenDiv(), CodeGenerator::codegenExtractHighPrecisionTimestamps(), CodeGenerator::codegenHoistedConstantsLoads(), Analyzer::BinOper::common_numeric_type(), Analyzer::BinOper::common_string_type(), anonymous_namespace{ArrowResultSetConverter.cpp}::create_or_append_validity(), Catalog_Namespace::Catalog::createTable(), Analyzer::Expr::decompress(), Analyzer::InIntegerSet::deep_copy(), fill_one_entry_one_col(), get_agg_initial_val(), anonymous_namespace{ArrowResultSetConverter.cpp}::get_dict_index_type_info(), get_logical_type_info(), get_null_check_suffix(), get_target_info(), Analyzer::anonymous_namespace{Analyzer.cpp}::is_expr_nullable(), FixedLengthArrayNoneEncoder::is_null(), ResultSet::isNull(), ArrowResultSetConverter::makeField(), NullAwareValidator< INNER_VALIDATOR >::NullAwareValidator(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator!=(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator=(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator==(), pair_to_double(), MapDHandler::populateThriftColumnType(), anonymous_namespace{TypedDataAccessors.h}::put_null(), anonymous_namespace{TypedDataAccessors.h}::put_null_array(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), Executor::reduceResults(), Fragmenter_Namespace::set_chunk_stats(), Parser::DDLStmt::setColumnDescriptor(), ThriftSerializers::type_info_to_thrift(), MapDHandler::value_to_thrift_column(), DeepCopyVisitor::visitInIntegerSet(), and File_Namespace::FileBuffer::writeMetadata().

326 { return notnull; }
+ Here is the caller graph for this function:

◆ get_output_srid()

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE int SQLTypeInfoCore< TYPE_FACET_PACK >::get_output_srid ( ) const
inline

Definition at line 325 of file sqltypes.h.

Referenced by Importer_NS::compress_coords(), MapDHandler::populateThriftColumnType(), Parser::DDLStmt::setColumnDescriptor(), RelAlgTranslator::translateBinaryGeoFunction(), RelAlgTranslator::translateGeoFunctionArg(), RelAlgTranslator::translateGeoLiteral(), and RelAlgTranslator::translateUnaryGeoFunction().

325 { return scale; }
+ Here is the caller graph for this function:

◆ get_physical_cols()

template<template< class > class... TYPE_FACET_PACK>
int SQLTypeInfoCore< TYPE_FACET_PACK >::get_physical_cols ( ) const
inline

Definition at line 340 of file sqltypes.h.

Referenced by Catalog_Namespace::Catalog::buildMaps(), and Catalog_Namespace::Catalog::renameColumn().

340  {
341  switch (type) {
342  case kPOINT:
343  return 1; // coords
344  case kLINESTRING:
345  return 2; // coords, bounds
346  case kPOLYGON:
347  return 4; // coords, ring_sizes, bounds, render_group
348  case kMULTIPOLYGON:
349  return 5; // coords, ring_sizes, poly_rings, bounds, render_group
350  default:
351  break;
352  }
353  return 0;
354  }
SQLTypes type
Definition: sqltypes.h:638
+ Here is the caller graph for this function:

◆ get_physical_coord_cols()

template<template< class > class... TYPE_FACET_PACK>
int SQLTypeInfoCore< TYPE_FACET_PACK >::get_physical_coord_cols ( ) const
inline

Definition at line 355 of file sqltypes.h.

Referenced by advance_target_ptr_col_wise(), advance_target_ptr_row_wise(), TargetExprCodegen::codegen(), get_slots_for_geo_target(), AggregateReductionEgress< Experimental::MetaTypeClass< Experimental::Geometry > >::operator()(), and RelAlgTranslator::translateGeoColumn().

355  {
356  // @TODO dmitri/simon rename this function?
357  // It needs to return the number of extra columns
358  // which need to go through the executor, as opposed
359  // to those which are only needed by CPU for poly
360  // cache building or what-not. For now, we just omit
361  // the Render Group column. If we add Bounding Box
362  // or something this may require rethinking. Perhaps
363  // these two functions need to return an array of
364  // offsets rather than just a number to loop over,
365  // so that executor and non-executor columns can
366  // be mixed.
367  // NOTE(adb): In binding to extension functions, we need to know some pretty specific
368  // type info about each of the physical coords cols for each geo type. I added checks
369  // there to ensure the physical coords col for the geo type match what we expect. If
370  // these values are ever changed, corresponding values in
371  // ExtensionFunctionsBinding.cpp::compute_narrowing_conv_scores and
372  // ExtensionFunctionsBinding.cpp::compute_widening_conv_scores will also need to be
373  // changed.
374  switch (type) {
375  case kPOINT:
376  return 1;
377  case kLINESTRING:
378  return 1; // omit bounds
379  case kPOLYGON:
380  return 2; // omit bounds, render group
381  case kMULTIPOLYGON:
382  return 3; // omit bounds, render group
383  default:
384  break;
385  }
386  return 0;
387  }
SQLTypes type
Definition: sqltypes.h:638
+ Here is the caller graph for this function:

◆ get_precision()

template<template< class > class... TYPE_FACET_PACK>
int SQLTypeInfoCore< TYPE_FACET_PACK >::get_precision ( ) const
inline

Definition at line 322 of file sqltypes.h.

Referenced by DecimalOverflowValidator::DecimalOverflowValidator(), ArrowResultSetConverter::getArrowType(), populate_TColumn(), MapDHandler::populateThriftColumnType(), random_fill(), Parser::DDLStmt::setColumnDescriptor(), Analyzer::UOper::toString(), and ThriftSerializers::type_info_to_thrift().

322 { return dimension; }
+ Here is the caller graph for this function:

◆ get_scale()

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE int SQLTypeInfoCore< TYPE_FACET_PACK >::get_scale ( ) const
inline

Definition at line 324 of file sqltypes.h.

Referenced by Catalog_Namespace::Catalog::addColumn(), Analyzer::BinOper::analyze_type_info(), Analyzer::Constant::cast_number(), NumberColumnDescriptor< T >::check_column_value(), CodeGenerator::codegenCastBetweenIntTypes(), CodeGenerator::codegenCastToFp(), CodeGenerator::codegenCmpDecimalConst(), CodeGenerator::codegenDiv(), CodeGenerator::codgenAdjustFixedEncNull(), Analyzer::BinOper::common_numeric_type(), convert_decimal_value_to_scale(), Catalog_Namespace::Catalog::createTable(), DatumToString(), anonymous_namespace{TypedDataAccessors.h}::decimal_to_double(), Analyzer::anonymous_namespace{Analyzer.cpp}::decimal_to_int_frac(), DecimalOverflowValidator::DecimalOverflowValidator(), Analyzer::Expr::decompress(), anonymous_namespace{TypedDataAccessors.h}::get_element_size(), get_logical_type_info(), ArrowResultSetConverter::getArrowType(), anonymous_namespace{RelAlgTranslator.cpp}::makeNumericConstant(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator!=(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator=(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator==(), pair_to_double(), parse_numeric(), Parser::InsertIntoTableAsSelectStmt::populateData(), MapDHandler::populateThriftColumnType(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), anonymous_namespace{ExpressionRange.cpp}::scale_up_interval_endpoint(), Analyzer::UOper::toString(), ThriftSerializers::type_info_to_thrift(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), MapDHandler::value_to_thrift(), MapDHandler::value_to_thrift_column(), and File_Namespace::FileBuffer::writeMetadata().

324 { return scale; }
+ Here is the caller graph for this function:

◆ get_size()

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE int SQLTypeInfoCore< TYPE_FACET_PACK >::get_size ( ) const
inline

Definition at line 329 of file sqltypes.h.

Referenced by Importer_NS::TypedImportBuffer::add_value(), Catalog_Namespace::Catalog::addColumn(), Chunk_NS::Chunk::begin_iterator(), anonymous_namespace{CastIR.cpp}::byte_array_cast(), CodeGenerator::castArrayPointer(), CodeGenerator::codegenAdd(), CodeGenerator::codegenCast(), CodeGenerator::codegenMul(), CodeGenerator::codegenSub(), CodeGenerator::codgenAdjustFixedEncNull(), GroupByAndAggregate::convertNullIfAny(), NumericConverterFactory< SOURCE_TYPE, TARGET_TYPE >::create(), DictionaryConverterFactory< TARGET_TYPE >::create(), Encoder::Create(), Catalog_Namespace::Catalog::createTable(), decimal_to_int_type(), anonymous_namespace{omnisql.cpp}::detect_table(), Parser::InsertValuesStmt::determineLeafIndex(), Executor::executeSimpleInsert(), BaselineJoinHashTable::fetchColumn(), JoinHashTable::fetchFragments(), Fragmenter_Namespace::FixedLenArrayChunkConverter::FixedLenArrayChunkConverter(), get_bit_width(), anonymous_namespace{ArrowResultSetConverter.cpp}::get_dict_index_type(), anonymous_namespace{ArrowResultSetConverter.cpp}::get_dict_index_type_info(), anonymous_namespace{TypedDataAccessors.h}::get_element_size(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::get_logical_size(), anonymous_namespace{ArrowResultSetConverter.cpp}::get_physical_type(), anonymous_namespace{TypedDataAccessors.h}::get_scalar(), ColumnFetcher::getAllColumnFragments(), Parser::InsertIntoTableAsSelectStmt::LocalConnector::getColumnDescriptors(), Chunk_NS::Chunk::getNumElemsForBytesInsertData(), inline_fixed_encoding_null_val(), is_unsigned_type(), Importer_NS::NullArray(), TextConverterFactory::operator()(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator=(), Parser::InsertIntoTableAsSelectStmt::populateData(), MapDHandler::populateThriftColumnType(), anonymous_namespace{TypedDataAccessors.h}::put_null(), anonymous_namespace{TypedDataAccessors.h}::put_null_array(), Parser::DDLStmt::setColumnDescriptor(), Fragmenter_Namespace::sizeOfRawColumn(), Importer_NS::StringToArray(), Importer_NS::TDatumToArrayDatum(), RelAlgTranslator::translateCardinality(), ThriftSerializers::type_info_to_thrift(), Importer_NS::TypedImportBuffer::TypedImportBuffer(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumns(), and File_Namespace::FileBuffer::writeMetadata().

329 { return size; }

◆ get_storage_size()

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE int SQLTypeInfoCore< TYPE_FACET_PACK >::get_storage_size ( ) const
inlineprivate

Definition at line 650 of file sqltypes.h.

650  {
651  switch (type) {
652  case kBOOLEAN:
653  return sizeof(int8_t);
654  case kTINYINT:
655  return sizeof(int8_t);
656  case kSMALLINT:
657  switch (compression) {
658  case kENCODING_NONE:
659  return sizeof(int16_t);
660  case kENCODING_FIXED:
661  case kENCODING_SPARSE:
662  return comp_param / 8;
663  case kENCODING_RL:
664  case kENCODING_DIFF:
665  break;
666  default:
667  assert(false);
668  }
669  break;
670  case kINT:
671  switch (compression) {
672  case kENCODING_NONE:
673  return sizeof(int32_t);
674  case kENCODING_FIXED:
675  case kENCODING_SPARSE:
676  return comp_param / 8;
677  case kENCODING_RL:
678  case kENCODING_DIFF:
679  break;
680  default:
681  assert(false);
682  }
683  break;
684  case kBIGINT:
685  case kNUMERIC:
686  case kDECIMAL:
687  switch (compression) {
688  case kENCODING_NONE:
689  return sizeof(int64_t);
690  case kENCODING_FIXED:
691  case kENCODING_SPARSE:
692  return comp_param / 8;
693  case kENCODING_RL:
694  case kENCODING_DIFF:
695  break;
696  default:
697  assert(false);
698  }
699  break;
700  case kFLOAT:
701  switch (compression) {
702  case kENCODING_NONE:
703  return sizeof(float);
704  case kENCODING_FIXED:
705  case kENCODING_RL:
706  case kENCODING_DIFF:
707  case kENCODING_SPARSE:
708  assert(false);
709  break;
710  default:
711  assert(false);
712  }
713  break;
714  case kDOUBLE:
715  switch (compression) {
716  case kENCODING_NONE:
717  return sizeof(double);
718  case kENCODING_FIXED:
719  case kENCODING_RL:
720  case kENCODING_DIFF:
721  case kENCODING_SPARSE:
722  assert(false);
723  break;
724  default:
725  assert(false);
726  }
727  break;
728  case kTIMESTAMP:
729  case kTIME:
730  case kINTERVAL_DAY_TIME:
732  case kDATE:
733  switch (compression) {
734  case kENCODING_NONE:
735  return sizeof(int64_t);
736  case kENCODING_FIXED:
737  if (type == kTIMESTAMP && dimension > 0) {
738  assert(false); // disable compression for timestamp precisions
739  }
740  return comp_param / 8;
741  case kENCODING_RL:
742  case kENCODING_DIFF:
743  case kENCODING_SPARSE:
744  assert(false);
745  break;
747  switch (comp_param) {
748  case 0:
749  return 4; // Default date encoded in days is 32 bits
750  case 16:
751  case 32:
752  return comp_param / 8;
753  default:
754  assert(false);
755  break;
756  }
757  default:
758  assert(false);
759  }
760  break;
761  case kTEXT:
762  case kVARCHAR:
763  case kCHAR:
764  if (compression == kENCODING_DICT) {
765  return sizeof(int32_t); // @TODO(wei) must check DictDescriptor
766  }
767  break;
768  case kARRAY:
769  // TODO: return size for fixlen arrays?
770  break;
771  case kPOINT:
772  case kLINESTRING:
773  case kPOLYGON:
774  case kMULTIPOLYGON:
775  break;
776  default:
777  break;
778  }
779  return -1;
780  }
Definition: sqltypes.h:51
Definition: sqltypes.h:54
Definition: sqltypes.h:55
Definition: sqltypes.h:43
Definition: sqltypes.h:47
SQLTypes type
Definition: sqltypes.h:638
EncodingType compression
Definition: sqltypes.h:643

◆ get_subtype()

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE SQLTypes SQLTypeInfoCore< TYPE_FACET_PACK >::get_subtype ( ) const
inline

Definition at line 320 of file sqltypes.h.

Referenced by Importer_NS::TypedImportBuffer::add_value(), Importer_NS::TypedImportBuffer::add_values(), Catalog_Namespace::Catalog::addColumn(), Parser::ArrayLiteral::analyze(), Parser::InsertValuesStmt::analyze(), anonymous_namespace{CastIR.cpp}::byte_array_cast(), CodeGenerator::codegenHoistedConstantsLoads(), CodeGenerator::codgenAdjustFixedEncNull(), Encoder::Create(), Catalog_Namespace::Catalog::createTable(), Analyzer::Expr::decompress(), anonymous_namespace{TypedDataAccessors.h}::get_element_size(), get_logical_type_info(), Importer_NS::Loader::getStringDict(), FixedLengthArrayNoneEncoder::is_null(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator!=(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator=(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator==(), Parser::InsertIntoTableAsSelectStmt::populateData(), MapDHandler::populateThriftColumnType(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), Parser::DDLStmt::setColumnDescriptor(), RelAlgTranslator::translateArrayFunction(), RelAlgTranslator::translateBinaryGeoFunction(), RelAlgTranslator::translateUnaryGeoFunction(), type_to_thrift(), Importer_NS::TypedImportBuffer::TypedImportBuffer(), FixedLengthArrayNoneEncoder::update_elem_stats(), ArrayNoneEncoder::update_elem_stats(), and File_Namespace::FileBuffer::writeMetadata().

320 { return subtype; }
SQLTypes subtype
Definition: sqltypes.h:639
+ Here is the caller graph for this function:

◆ get_type()

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE SQLTypes SQLTypeInfoCore< TYPE_FACET_PACK >::get_type ( ) const
inline

Definition at line 319 of file sqltypes.h.

Referenced by Importer_NS::TypedImportBuffer::add_arrow_values(), Importer_NS::TypedImportBuffer::add_value(), Importer_NS::TypedImportBuffer::add_values(), Catalog_Namespace::Catalog::addColumn(), Parser::ArrayLiteral::analyze(), Parser::FunctionRef::analyze(), Parser::InsertValuesStmt::analyze(), Analyzer::BinOper::analyze_type_info(), Importer_NS::appendDatum(), Analyzer::Constant::cast_number(), Analyzer::Constant::cast_string(), Analyzer::Constant::cast_to_string(), CodeGenerator::castArrayPointer(), NumberColumnDescriptor< T >::check_column_value(), BooleanColumnDescriptor::check_column_value(), StringColumnDescriptor::check_column_value(), DateTimeColumnDescriptor::check_column_value(), GeoPointColumnDescriptor::check_column_value(), GeoLinestringColumnDescriptor::check_column_value(), GeoMultiPolygonColumnDescriptor::check_column_value(), GeoPolygonColumnDescriptor::check_column_value(), TargetExprCodegen::codegen(), CodeGenerator::codegenCast(), CodeGenerator::codegenCastFromFp(), CodeGenerator::codegenCastToFp(), CodeGenerator::codegenCmp(), CodeGenerator::codegenDiv(), CodeGenerator::codegenFunctionOper(), CodeGenerator::codegenHoistedConstantsLoads(), CodeGenerator::codegenIsNullNumber(), Analyzer::BinOper::common_numeric_type(), Analyzer::BinOper::common_string_type(), Importer_NS::TypedImportBuffer::convert_arrow_val_to_import_buffer(), TargetValueConverterFactory::create(), Encoder::Create(), Catalog_Namespace::Catalog::createTable(), Analyzer::Datum_equal(), DatumEqual(), DatumToString(), decompress(), Analyzer::Expr::decompress(), Analyzer::Constant::deep_copy(), Analyzer::Constant::do_cast(), Parser::anonymous_namespace{ParserNode.cpp}::expr_is_null(), extract_from_datum(), anonymous_namespace{ExpressionRange.cpp}::extract_max_stat_double(), anonymous_namespace{ExpressionRange.cpp}::extract_min_stat_double(), ChunkMetadata::fillChunkStats(), anonymous_namespace{WindowContext.cpp}::fp_comparator(), anonymous_namespace{ExpressionRange.cpp}::fpRangeFromDecimal(), get_bit_width(), anonymous_namespace{JoinHashTable.cpp}::get_bucketized_hash_entry_info(), anonymous_namespace{ArrowResultSetConverter.cpp}::get_dict_index_type(), ExtensionFunctionsWhitelist::get_ext_funcs(), get_logical_type_info(), anonymous_namespace{ArrowResultSetConverter.cpp}::get_physical_type(), anonymous_namespace{TypedDataAccessors.h}::get_scalar(), anonymous_namespace{WindowFunctionIR.cpp}::get_window_agg_name(), Chunk_NS::Chunk::getChunkBuffer(), getExpressionRange(), Geo_namespace::GeoTypesFactory::getGeoColumns(), JoinHashTable::getHashJoinArgs(), Chunk_NS::Chunk::getNumElemsForBytesInsertData(), Importer_NS::Loader::getStringDict(), Experimental::MetaSwitchTraits< SQLTypeInfo >::getType(), Analyzer::ColumnVar::group_predicates(), Importer_NS::import_thread_delimited(), Importer_NS::import_thread_shapefile(), Chunk_NS::Chunk::init_encoder(), inline_fp_null_val(), inline_int_null_val(), anonymous_namespace{Execute.cpp}::inline_null_val(), CgenState::inlineFpNull(), CgenState::inlineIntNull(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_castable(), anonymous_namespace{ScalarCodeGenerator.cpp}::llvm_type_from_sql(), MapDHandler::load_table(), make_fp_constant(), ResultSet::makeGeoTargetValue(), anonymous_namespace{RelAlgTranslator.cpp}::makeNumericConstant(), ResultSet::makeTargetValue(), ResultSet::makeVarlenTargetValue(), anonymous_namespace{ExtensionFunctionsBinding.cpp}::match_arguments(), anonymous_namespace{WindowExpressionRewrite.cpp}::matches_gt_bigint_zero(), need_patch_unnest_double(), Parser::CaseExpr::normalize(), null_val_bit_pattern(), Importer_NS::NullArrayDatum(), Importer_NS::NullDatum(), numeric_type_name(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator!=(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator=(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator==(), pair_to_double(), populate_TColumn(), Parser::InsertIntoTableAsSelectStmt::populateData(), MapDHandler::populateThriftColumnType(), anonymous_namespace{TypedDataAccessors.h}::put_null(), anonymous_namespace{TypedDataAccessors.h}::put_null_array(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), random_fill(), scan_chunk(), Importer_NS::Importer::set_geo_physical_import_buffer(), Importer_NS::Importer::set_geo_physical_import_buffer_columnar(), anonymous_namespace{TableOptimizer.cpp}::set_metadata_from_results(), Analyzer::Constant::set_null_value(), Parser::DDLStmt::setColumnDescriptor(), Fragmenter_Namespace::sizeOfRawColumn(), StringToDatum(), GroupByAndAggregate::supportedTypeForGpuSharedMemUsage(), takes_float_argument(), Importer_NS::TDatumToDatum(), Analyzer::Constant::toString(), RelAlgTranslator::translateBinaryGeoFunction(), RelAlgTranslator::translateGeoColumn(), RelAlgTranslator::translateGeoFunctionArg(), RelAlgTranslator::translateGeoLiteral(), RelAlgTranslator::translateGeoOverlapsOper(), RelAlgTranslator::translateUnaryGeoFunction(), type_to_thrift(), Importer_NS::TypedImportBuffer::TypedImportBuffer(), MapDHandler::value_to_thrift(), MapDHandler::value_to_thrift_column(), anonymous_namespace{WindowExpressionRewrite.cpp}::window_sum_and_count_match(), and File_Namespace::FileBuffer::writeMetadata().

319 { return type; }
SQLTypes type
Definition: sqltypes.h:638

◆ get_type_name()

template<template< class > class... TYPE_FACET_PACK>
std::string SQLTypeInfoCore< TYPE_FACET_PACK >::get_type_name ( ) const
inline

Definition at line 422 of file sqltypes.h.

Referenced by Analyzer::Expr::add_cast(), Analyzer::BinOper::analyze_type_info(), CodeGenerator::codegenCastFromFp(), CodeGenerator::codegenCastFromString(), CodeGenerator::codegenCastToFp(), Analyzer::BinOper::common_numeric_type(), TargetValueConverterFactory::create(), anonymous_namespace{ArrowImporter.h}::data_conversion_error(), Analyzer::Datum_equal(), DatumToString(), anonymous_namespace{omnisql.cpp}::detect_table(), Analyzer::Constant::do_cast(), ArrowResultSetConverter::getArrowType(), Data_Namespace::AbstractBuffer::initEncoder(), ResultSet::makeGeoTargetValue(), anonymous_namespace{ExtensionFunctionsBinding.cpp}::match_arguments(), pair_to_double(), Parser::InsertIntoTableAsSelectStmt::populateData(), Fragmenter_Namespace::sizeOfRawColumn(), StringToDatum(), Analyzer::ColumnVar::toString(), Analyzer::UOper::toString(), anonymous_namespace{ArrowImporter.h}::type_conversion_error(), and anonymous_namespace{ImportTest.cpp}::TypeToString().

422  {
423  if (IS_GEO(type)) {
424  std::string srid_string = "";
425  if (get_output_srid() > 0) {
426  srid_string = ", " + std::to_string(get_output_srid());
427  }
428  return type_name[(int)subtype] + "(" + type_name[(int)type] + srid_string + ")";
429  }
430  std::string ps = "";
431  if (type == kDECIMAL || type == kNUMERIC || subtype == kDECIMAL ||
432  subtype == kNUMERIC) {
433  ps = "(" + std::to_string(dimension) + "," + std::to_string(scale) + ")";
434  } else if (type == kTIMESTAMP) {
435  ps = "(" + std::to_string(dimension) + ")";
436  }
437  if (type == kARRAY) {
438  auto elem_ti = get_elem_type();
439  auto num_elems = (size > 0) ? std::to_string(size / elem_ti.get_size()) : "";
440  return type_name[(int)subtype] + ps + "[" + num_elems + "]";
441  }
442  return type_name[(int)type] + ps;
443  }
std::string to_string(char const *&&v)
static std::string type_name[kSQLTYPE_LAST]
Definition: sqltypes.h:647
SQLTypeInfoCore get_elem_type() const
Definition: sqltypes.h:628
SQLTypes subtype
Definition: sqltypes.h:639
HOST DEVICE int get_output_srid() const
Definition: sqltypes.h:325
SQLTypes type
Definition: sqltypes.h:638
#define IS_GEO(T)
Definition: sqltypes.h:165
+ Here is the caller graph for this function:

◆ has_bounds()

template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::has_bounds ( ) const
inline

Definition at line 388 of file sqltypes.h.

Referenced by RelAlgTranslator::translateGeoColumn(), and RelAlgTranslator::translateGeoLiteral().

388  {
389  switch (type) {
390  case kLINESTRING:
391  case kPOLYGON:
392  case kMULTIPOLYGON:
393  return true;
394  default:
395  break;
396  }
397  return false;
398  }
SQLTypes type
Definition: sqltypes.h:638
+ Here is the caller graph for this function:

◆ has_render_group()

template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::has_render_group ( ) const
inline

Definition at line 399 of file sqltypes.h.

Referenced by RelAlgTranslator::translateGeoColumn().

399  {
400  switch (type) {
401  case kPOLYGON:
402  case kMULTIPOLYGON:
403  return true;
404  default:
405  break;
406  }
407  return false;
408  }
SQLTypes type
Definition: sqltypes.h:638
+ Here is the caller graph for this function:

◆ is_array()

template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_array ( ) const
inline

Definition at line 454 of file sqltypes.h.

Referenced by anonymous_namespace{ResultSetIteration.cpp}::build_array_target_value(), anonymous_namespace{CastIR.cpp}::byte_array_cast(), CodeGenerator::codegenHoistedConstantsLoads(), CodeGenerator::codegenHoistedConstantsPlaceholders(), Catalog_Namespace::Catalog::createTable(), DateDaysOverflowValidator::DateDaysOverflowValidator(), datum_to_string(), DecimalOverflowValidator::DecimalOverflowValidator(), anonymous_namespace{omnisql.cpp}::detect_table(), Analyzer::Constant::do_cast(), anonymous_namespace{TypedDataAccessors.h}::get_element_size(), Parser::InsertIntoTableAsSelectStmt::LocalConnector::getColumnDescriptors(), getLeafColumnRange(), ResultSet::getTargetValueFromBufferRowwise(), is_real_str_or_array(), Fragmenter_Namespace::isDatumVectorData(), ResultSet::makeVarlenTargetValue(), null_val_bit_pattern(), NullAwareValidator< INNER_VALIDATOR >::NullAwareValidator(), Analyzer::Constant::operator==(), Parser::InsertIntoTableAsSelectStmt::populateData(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), Catalog_Namespace::Catalog::setColumnDictionary(), anonymous_namespace{LogicalIR.cpp}::should_defer_eval(), Analyzer::Constant::toString(), ThriftSerializers::type_info_to_thrift(), MapDHandler::value_to_thrift(), and MapDHandler::value_to_thrift_column().

454 { return type == kARRAY; }
SQLTypes type
Definition: sqltypes.h:638
+ Here is the caller graph for this function:

◆ is_boolean()

◆ is_castable()

template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_castable ( const SQLTypeInfoCore< TYPE_FACET_PACK > &  new_type_info) const
inline

Definition at line 506 of file sqltypes.h.

Referenced by Analyzer::Expr::add_cast().

506  {
507  // can always cast between the same type but different precision/scale/encodings
508  if (type == new_type_info.get_type()) {
509  return true;
510  // can always cast from or to string
511  } else if (is_string() || new_type_info.is_string()) {
512  return true;
513  // can cast between numbers
514  } else if (is_number() && new_type_info.is_number()) {
515  return true;
516  // can cast from timestamp or date to number (epoch)
517  } else if ((type == kTIMESTAMP || type == kDATE) && new_type_info.is_number()) {
518  return true;
519  // can cast from date to timestamp
520  } else if (type == kDATE && new_type_info.get_type() == kTIMESTAMP) {
521  return true;
522  } else if (type == kTIMESTAMP && new_type_info.get_type() == kDATE) {
523  return true;
524  } else if (type == kBOOLEAN && new_type_info.is_number()) {
525  return true;
526  } else if (type == kARRAY && new_type_info.get_type() == kARRAY) {
527  return get_elem_type().is_castable(new_type_info.get_elem_type());
528  } else {
529  return false;
530  }
531  }
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:319
bool is_castable(const SQLTypeInfoCore &new_type_info) const
Definition: sqltypes.h:506
SQLTypeInfoCore get_elem_type() const
Definition: sqltypes.h:628
Definition: sqltypes.h:55
bool is_number() const
Definition: sqltypes.h:451
SQLTypes type
Definition: sqltypes.h:638
bool is_string() const
Definition: sqltypes.h:446
+ Here is the caller graph for this function:

◆ is_decimal()

template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_decimal ( ) const
inline

Definition at line 449 of file sqltypes.h.

Referenced by Importer_NS::TypedImportBuffer::add_arrow_values(), Importer_NS::TypedImportBuffer::add_value(), Analyzer::BinOper::analyze_type_info(), CodeGenerator::checkExpressionRanges(), anonymous_namespace{TopKTest.cpp}::SQLiteComparator::checkTypeConsistency(), anonymous_namespace{ExecuteTest.cpp}::SQLiteComparator::checkTypeConsistency(), CodeGenerator::codegenAdd(), CodeGenerator::codegenCast(), CodeGenerator::codegenCastBetweenIntTypes(), CodeGenerator::codegenCastFromFp(), CodeGenerator::codegenCmp(), CodeGenerator::codegenDiv(), CodeGenerator::codegenFunctionOperWithCustomTypeHandling(), CodeGenerator::codegenHoistedConstantsLoads(), CodeGenerator::codegenMul(), CodeGenerator::codegenSub(), datum_to_string(), DecimalOverflowValidator::DecimalOverflowValidator(), extract_from_datum(), get_bit_width(), inline_fixed_encoding_null_val(), anonymous_namespace{ResultSetIteration.cpp}::make_avg_target_value(), Importer_NS::NullArrayDatum(), Importer_NS::NullDatum(), numeric_type_name(), pair_to_double(), Parser::InsertIntoTableAsSelectStmt::populateData(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), Executor::reduceResults(), Parser::DDLStmt::setColumnDescriptor(), Importer_NS::TDatumToDatum(), anonymous_namespace{UpdelStorageTest.cpp}::update_column_from_decimal(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumnMetadata(), anonymous_namespace{InputMetadata.cpp}::uses_int_meta(), and anonymous_namespace{ExpressionRewrite.cpp}::ConstantFoldingVisitor::visitBinOper().

449 { return type == kDECIMAL || type == kNUMERIC; }
SQLTypes type
Definition: sqltypes.h:638
+ Here is the caller graph for this function:

◆ is_dict_encoded_string()

template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_dict_encoded_string ( ) const
inline

Definition at line 472 of file sqltypes.h.

Referenced by anonymous_namespace{ArrowResultSetConverter.cpp}::create_or_append_validity(), anonymous_namespace{ArrowResultSetConverter.cpp}::get_dict_index_type(), anonymous_namespace{ArrowResultSetConverter.cpp}::get_dict_index_type_info(), ArrowResultSetConverter::getArrowType(), and ArrowResultSetConverter::initializeColumnBuilder().

472  {
473  return is_string() && compression == kENCODING_DICT;
474  }
bool is_string() const
Definition: sqltypes.h:446
EncodingType compression
Definition: sqltypes.h:643
+ Here is the caller graph for this function:

◆ is_fixlen_array()

template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_fixlen_array ( ) const
inline

Definition at line 456 of file sqltypes.h.

Referenced by Chunk_NS::Chunk::createChunkBuffer(), Chunk_NS::Chunk::getChunkBuffer(), Chunk_NS::Chunk::init_encoder(), and Chunk_NS::Chunk::isChunkOnDevice().

456 { return type == kARRAY && size > 0; }
SQLTypes type
Definition: sqltypes.h:638
+ Here is the caller graph for this function:

◆ is_fp()

◆ is_geometry()

◆ is_integer()

template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_integer ( ) const
inline

◆ is_null() [1/2]

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_null ( const Datum d) const
inline

Definition at line 533 of file sqltypes.h.

Referenced by ChunkIter_get_next(), ChunkIter_get_nth(), and decompress().

533  {
534  // assuming Datum is always uncompressed
535  switch (type) {
536  case kBOOLEAN:
537  return (int8_t)d.boolval == NULL_BOOLEAN;
538  case kTINYINT:
539  return d.tinyintval == NULL_TINYINT;
540  case kSMALLINT:
541  return d.smallintval == NULL_SMALLINT;
542  case kINT:
543  return d.intval == NULL_INT;
544  case kBIGINT:
545  case kNUMERIC:
546  case kDECIMAL:
547  return d.bigintval == NULL_BIGINT;
548  case kFLOAT:
549  return d.floatval == NULL_FLOAT;
550  case kDOUBLE:
551  return d.doubleval == NULL_DOUBLE;
552  case kTIME:
553  case kTIMESTAMP:
554  case kDATE:
555  return d.bigintval == NULL_BIGINT;
556  case kTEXT:
557  case kVARCHAR:
558  case kCHAR:
559  // @TODO handle null strings
560  break;
561  case kNULLT:
562  return true;
563  case kARRAY:
564  return d.arrayval == NULL || d.arrayval->is_null;
565  default:
566  break;
567  }
568  return false;
569  }
int8_t tinyintval
Definition: sqltypes.h:123
#define NULL_DOUBLE
Definition: sqltypes.h:177
Definition: sqltypes.h:51
bool is_null
Definition: sqltypes.h:73
#define NULL_BIGINT
Definition: sqltypes.h:175
bool boolval
Definition: sqltypes.h:122
VarlenDatum * arrayval
Definition: sqltypes.h:129
int32_t intval
Definition: sqltypes.h:125
float floatval
Definition: sqltypes.h:127
#define NULL_TINYINT
Definition: sqltypes.h:172
int64_t bigintval
Definition: sqltypes.h:126
#define NULL_FLOAT
Definition: sqltypes.h:176
int16_t smallintval
Definition: sqltypes.h:124
#define NULL_INT
Definition: sqltypes.h:174
Definition: sqltypes.h:54
Definition: sqltypes.h:55
Definition: sqltypes.h:43
#define NULL_SMALLINT
Definition: sqltypes.h:173
Definition: sqltypes.h:47
SQLTypes type
Definition: sqltypes.h:638
#define NULL_BOOLEAN
Definition: sqltypes.h:171
double doubleval
Definition: sqltypes.h:128
+ Here is the caller graph for this function:

◆ is_null() [2/2]

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_null ( const int8_t *  val) const
inline

Definition at line 570 of file sqltypes.h.

570  {
571  if (type == kFLOAT) {
572  return *(float*)val == NULL_FLOAT;
573  }
574  if (type == kDOUBLE) {
575  return *(double*)val == NULL_DOUBLE;
576  }
577  // val can be either compressed or uncompressed
578  switch (size) {
579  case 1:
580  return *val == NULL_TINYINT;
581  case 2:
582  return *(int16_t*)val == NULL_SMALLINT;
583  case 4:
584  return *(int32_t*)val == NULL_INT;
585  case 8:
586  return *(int64_t*)val == NULL_BIGINT;
587  case kNULLT:
588  return true;
589  default:
590  // @TODO(wei) handle null strings
591  break;
592  }
593  return false;
594  }
#define NULL_DOUBLE
Definition: sqltypes.h:177
#define NULL_BIGINT
Definition: sqltypes.h:175
#define NULL_TINYINT
Definition: sqltypes.h:172
#define NULL_FLOAT
Definition: sqltypes.h:176
#define NULL_INT
Definition: sqltypes.h:174
#define NULL_SMALLINT
Definition: sqltypes.h:173
SQLTypes type
Definition: sqltypes.h:638

◆ is_null_fixlen_array()

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_null_fixlen_array ( const int8_t *  val,
int  array_size 
) const
inline

Definition at line 595 of file sqltypes.h.

Referenced by ChunkIter_get_nth().

595  {
596  // Check if fixed length array has a NULL_ARRAY sentinel as the first element
597  if (type == kARRAY && val && array_size > 0 && array_size == size) {
598  // Need to create element type to get the size, but can't call get_elem_type()
599  // since this is a HOST DEVICE function. Going through copy constructor instead.
600  auto elem_ti{*this};
601  elem_ti.set_type(subtype);
602  elem_ti.set_subtype(kNULLT);
603  auto elem_size = elem_ti.get_storage_size();
604  if (elem_size < 1) {
605  return false;
606  }
607  if (subtype == kFLOAT) {
608  return *(float*)val == NULL_ARRAY_FLOAT;
609  }
610  if (subtype == kDOUBLE) {
611  return *(double*)val == NULL_ARRAY_DOUBLE;
612  }
613  switch (elem_size) {
614  case 1:
615  return *val == NULL_ARRAY_TINYINT;
616  case 2:
617  return *(int16_t*)val == NULL_ARRAY_SMALLINT;
618  case 4:
619  return *(int32_t*)val == NULL_ARRAY_INT;
620  case 8:
621  return *(int64_t*)val == NULL_ARRAY_BIGINT;
622  default:
623  return false;
624  }
625  }
626  return false;
627  }
#define NULL_ARRAY_DOUBLE
Definition: sqltypes.h:185
#define NULL_ARRAY_SMALLINT
Definition: sqltypes.h:181
#define NULL_ARRAY_TINYINT
Definition: sqltypes.h:180
#define NULL_ARRAY_INT
Definition: sqltypes.h:182
SQLTypes subtype
Definition: sqltypes.h:639
#define NULL_ARRAY_BIGINT
Definition: sqltypes.h:183
SQLTypes type
Definition: sqltypes.h:638
#define NULL_ARRAY_FLOAT
Definition: sqltypes.h:184
+ Here is the caller graph for this function:

◆ is_number()

template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_number ( ) const
inline

◆ is_string()

template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_string ( ) const
inline

Definition at line 446 of file sqltypes.h.

Referenced by Analyzer::Expr::add_cast(), Analyzer::UOper::add_cast(), Analyzer::CaseExpr::add_cast(), Parser::InValues::analyze(), Parser::FunctionRef::analyze(), Parser::QuerySpec::analyze_group_by(), Analyzer::BinOper::analyze_type_info(), CodeGenerator::castArrayPointer(), CodeGenerator::codegenCast(), CodeGenerator::codegenCastFromString(), CodeGenerator::codegenCmp(), CodeGenerator::codegenHoistedConstantsLoads(), CodeGenerator::codegenHoistedConstantsPlaceholders(), Analyzer::BinOper::common_string_type(), Encoder::Create(), CodeGenerator::createInValuesBitmap(), Analyzer::Constant::deep_copy(), Catalog_Namespace::Catalog::delDictionary(), anonymous_namespace{omnisql.cpp}::detect_table(), Parser::InsertValuesStmt::determineLeafIndex(), Analyzer::Constant::do_cast(), Executor::executeSimpleInsert(), get_agg_initial_val(), anonymous_namespace{TargetExprBuilder.cpp}::get_initial_agg_val(), Importer_NS::Loader::getStringDict(), ResultSet::getTargetValueFromBufferRowwise(), CodeGenerator::hashJoinLhs(), inline_fixed_encoding_null_val(), inline_int_null_val(), anonymous_namespace{Execute.cpp}::inline_null_val(), CgenState::inlineIntNull(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_castable(), is_real_str_or_array(), Fragmenter_Namespace::isStringVectorData(), ResultSet::makeTargetValue(), ResultSet::makeVarlenTargetValue(), Parser::CaseExpr::normalize(), null_val_bit_pattern(), Importer_NS::NullArray(), numeric_type_name(), Parser::InsertIntoTableAsSelectStmt::populateData(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), ResultSetReductionJIT::reduceOneSlot(), ResultSetStorage::reduceOneSlot(), Parser::DDLStmt::setColumnDescriptor(), Importer_NS::StringToArray(), Importer_NS::TDatumToArrayDatum(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumns(), anonymous_namespace{InputMetadata.cpp}::uses_int_meta(), and Analyzer::Constant::~Constant().

446 { return IS_STRING(type); }
#define IS_STRING(T)
Definition: sqltypes.h:163
SQLTypes type
Definition: sqltypes.h:638

◆ is_string_array()

template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_string_array ( ) const
inline

Definition at line 447 of file sqltypes.h.

Referenced by Catalog_Namespace::Catalog::delDictionary(), anonymous_namespace{TypedDataAccessors.h}::get_element_size(), and Parser::DDLStmt::setColumnDescriptor().

447 { return (type == kARRAY) && IS_STRING(subtype); }
SQLTypes subtype
Definition: sqltypes.h:639
#define IS_STRING(T)
Definition: sqltypes.h:163
SQLTypes type
Definition: sqltypes.h:638
+ Here is the caller graph for this function:

◆ is_time()

◆ is_timeinterval()

template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_timeinterval ( ) const
inline

◆ is_varlen()

template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_varlen ( ) const
inline

Definition at line 460 of file sqltypes.h.

Referenced by Chunk_NS::Chunk::createChunkBuffer(), Chunk_NS::Chunk::getChunkBuffer(), Chunk_NS::Chunk::getNumElemsForBytesInsertData(), Chunk_NS::Chunk::init_encoder(), Chunk_NS::Chunk::isChunkOnDevice(), AggregateReductionEgress< META_TYPE_CLASS >::operator()(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), ResultSetReductionJIT::reduceOneSlot(), ResultSetStorage::reduceOneSlot(), and ResultSetStorage::reduceOneSlotBaseline().

460  { // TODO: logically this should ignore fixlen arrays
461  return (IS_STRING(type) && compression != kENCODING_DICT) || type == kARRAY ||
462  IS_GEO(type);
463  }
#define IS_STRING(T)
Definition: sqltypes.h:163
SQLTypes type
Definition: sqltypes.h:638
#define IS_GEO(T)
Definition: sqltypes.h:165
EncodingType compression
Definition: sqltypes.h:643
+ Here is the caller graph for this function:

◆ is_varlen_array()

template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_varlen_array ( ) const
inline

Definition at line 455 of file sqltypes.h.

455 { return type == kARRAY && size <= 0; }
SQLTypes type
Definition: sqltypes.h:638

◆ is_varlen_indeed()

template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_varlen_indeed ( ) const
inline

Definition at line 466 of file sqltypes.h.

466  {
467  // SQLTypeInfo.is_varlen() is broken with fixedlen array now
468  // and seems left broken for some concern, so fix it locally
469  return is_varlen() && !is_fixlen_array();
470  }
bool is_varlen() const
Definition: sqltypes.h:460
bool is_fixlen_array() const
Definition: sqltypes.h:456

◆ operator!=()

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE bool SQLTypeInfoCore< TYPE_FACET_PACK >::operator!= ( const SQLTypeInfoCore< TYPE_FACET_PACK > &  rhs) const
inline

Definition at line 476 of file sqltypes.h.

476  {
477  return type != rhs.get_type() || subtype != rhs.get_subtype() ||
478  dimension != rhs.get_dimension() || scale != rhs.get_scale() ||
479  compression != rhs.get_compression() ||
482  notnull != rhs.get_notnull();
483  }
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:321
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:326
HOST DEVICE int get_scale() const
Definition: sqltypes.h:324
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:319
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:327
HOST DEVICE SQLTypes get_subtype() const
Definition: sqltypes.h:320
SQLTypes subtype
Definition: sqltypes.h:639
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:328
SQLTypes type
Definition: sqltypes.h:638
#define TRANSIENT_DICT(ID)
Definition: sqltypes.h:188
EncodingType compression
Definition: sqltypes.h:643

◆ operator=()

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE SQLTypeInfoCore& SQLTypeInfoCore< TYPE_FACET_PACK >::operator= ( const SQLTypeInfoCore< TYPE_FACET_PACK > &  rhs)
inline

Definition at line 494 of file sqltypes.h.

494  {
495  type = rhs.get_type();
496  subtype = rhs.get_subtype();
497  dimension = rhs.get_dimension();
498  scale = rhs.get_scale();
499  notnull = rhs.get_notnull();
501  comp_param = rhs.get_comp_param();
502  size = rhs.get_size();
503  return (*this);
504  }
HOST DEVICE int get_size() const
Definition: sqltypes.h:329
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:321
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:326
HOST DEVICE int get_scale() const
Definition: sqltypes.h:324
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:319
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:327
HOST DEVICE SQLTypes get_subtype() const
Definition: sqltypes.h:320
SQLTypes subtype
Definition: sqltypes.h:639
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:328
SQLTypes type
Definition: sqltypes.h:638
EncodingType compression
Definition: sqltypes.h:643

◆ operator==()

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE bool SQLTypeInfoCore< TYPE_FACET_PACK >::operator== ( const SQLTypeInfoCore< TYPE_FACET_PACK > &  rhs) const
inline

Definition at line 484 of file sqltypes.h.

484  {
485  return type == rhs.get_type() && subtype == rhs.get_subtype() &&
486  dimension == rhs.get_dimension() && scale == rhs.get_scale() &&
487  compression == rhs.get_compression() &&
490  notnull == rhs.get_notnull();
491  }
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:321
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:326
HOST DEVICE int get_scale() const
Definition: sqltypes.h:324
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:319
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:327
HOST DEVICE SQLTypes get_subtype() const
Definition: sqltypes.h:320
SQLTypes subtype
Definition: sqltypes.h:639
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:328
SQLTypes type
Definition: sqltypes.h:638
#define TRANSIENT_DICT(ID)
Definition: sqltypes.h:188
EncodingType compression
Definition: sqltypes.h:643

◆ set_comp_param()

◆ set_compression()

template<template< class > class... TYPE_FACET_PACK>
void SQLTypeInfoCore< TYPE_FACET_PACK >::set_compression ( EncodingType  c)
inline

◆ set_dimension()

template<template< class > class... TYPE_FACET_PACK>
void SQLTypeInfoCore< TYPE_FACET_PACK >::set_dimension ( int  d)
inline

Definition at line 411 of file sqltypes.h.

Referenced by Analyzer::BinOper::analyze_type_info(), Catalog_Namespace::Catalog::buildMaps(), parse_numeric(), File_Namespace::FileBuffer::readMetadata(), and Parser::DDLStmt::setColumnDescriptor().

411 { dimension = d; }
void d(const SQLTypes expected_type, const std::string &str)
Definition: ImportTest.cpp:268
+ Here is the caller graph for this function:

◆ set_fixed_size()

template<template< class > class... TYPE_FACET_PACK>
void SQLTypeInfoCore< TYPE_FACET_PACK >::set_fixed_size ( )
inline

Definition at line 418 of file sqltypes.h.

Referenced by Parser::QuerySpec::analyze_group_by(), Analyzer::BinOper::common_numeric_type(), Importer_NS::Importer::gdalToColumnDescriptors(), Parser::OperExpr::normalize(), and Parser::DDLStmt::setColumnDescriptor().

418 { size = get_storage_size(); }
HOST DEVICE int get_storage_size() const
Definition: sqltypes.h:650
+ Here is the caller graph for this function:

◆ set_input_srid()

template<template< class > class... TYPE_FACET_PACK>
void SQLTypeInfoCore< TYPE_FACET_PACK >::set_input_srid ( int  d)
inline

Definition at line 413 of file sqltypes.h.

Referenced by Importer_NS::Importer::gdalToColumnDescriptors(), Geo_namespace::GeoTypesFactory::getGeoColumns(), Parser::DDLStmt::setColumnDescriptor(), RelAlgTranslator::translateGeoFunctionArg(), and RelAlgTranslator::translateGeoLiteral().

413 { dimension = d; }
void d(const SQLTypes expected_type, const std::string &str)
Definition: ImportTest.cpp:268
+ Here is the caller graph for this function:

◆ set_notnull()

template<template< class > class... TYPE_FACET_PACK>
void SQLTypeInfoCore< TYPE_FACET_PACK >::set_notnull ( bool  n)
inline

Definition at line 416 of file sqltypes.h.

Referenced by Analyzer::BinOper::analyze_type_info(), Catalog_Namespace::Catalog::buildMaps(), get_compact_type(), Parser::CaseExpr::normalize(), parse_numeric(), File_Namespace::FileBuffer::readMetadata(), Parser::DDLStmt::setColumnDescriptor(), and RelAlgTranslator::translateFunction().

416 { notnull = n; }
+ Here is the caller graph for this function:

◆ set_output_srid()

template<template< class > class... TYPE_FACET_PACK>
void SQLTypeInfoCore< TYPE_FACET_PACK >::set_output_srid ( int  s)
inline

Definition at line 415 of file sqltypes.h.

Referenced by Importer_NS::Importer::gdalToColumnDescriptors(), Geo_namespace::GeoTypesFactory::getGeoColumns(), Parser::DDLStmt::setColumnDescriptor(), RelAlgTranslator::translateGeoFunctionArg(), and RelAlgTranslator::translateGeoLiteral().

415 { scale = s; }
+ Here is the caller graph for this function:

◆ set_precision()

template<template< class > class... TYPE_FACET_PACK>
void SQLTypeInfoCore< TYPE_FACET_PACK >::set_precision ( int  d)
inline

Definition at line 412 of file sqltypes.h.

Referenced by Parser::FixedPtLiteral::analyzeValue(), anonymous_namespace{RelAlgTranslator.cpp}::build_type_info(), and anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_type().

412 { dimension = d; }
void d(const SQLTypes expected_type, const std::string &str)
Definition: ImportTest.cpp:268
+ Here is the caller graph for this function:

◆ set_scale()

template<template< class > class... TYPE_FACET_PACK>
void SQLTypeInfoCore< TYPE_FACET_PACK >::set_scale ( int  s)
inline

◆ set_size()

template<template< class > class... TYPE_FACET_PACK>
void SQLTypeInfoCore< TYPE_FACET_PACK >::set_size ( int  s)
inline

Definition at line 417 of file sqltypes.h.

Referenced by Catalog_Namespace::Catalog::buildMaps(), Catalog_Namespace::Catalog::createTable(), Catalog_Namespace::Catalog::expandGeoColumn(), File_Namespace::FileBuffer::readMetadata(), Parser::DDLStmt::setColumnDescriptor(), Catalog_Namespace::Catalog::setColumnDictionary(), and RelAlgTranslator::translateGeoLiteral().

417 { size = s; }
+ Here is the caller graph for this function:

◆ set_subtype()

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE void SQLTypeInfoCore< TYPE_FACET_PACK >::set_subtype ( SQLTypes  st)
inline

◆ set_type()

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE void SQLTypeInfoCore< TYPE_FACET_PACK >::set_type ( SQLTypes  t)
inline

Definition at line 409 of file sqltypes.h.

Referenced by Catalog_Namespace::Catalog::buildMaps(), Importer_NS::Importer::gdalToColumnDescriptors(), Geo_namespace::GeoTypesFactory::getGeoColumnsImpl(), File_Namespace::FileBuffer::readMetadata(), Parser::DDLStmt::setColumnDescriptor(), and RelAlgTranslator::translateGeoFunctionArg().

409 { type = t; }
SQLTypes type
Definition: sqltypes.h:638
+ Here is the caller graph for this function:

Member Data Documentation

◆ comp_name

template<template< class > class... TYPE_FACET_PACK>
std::string SQLTypeInfoCore< TYPE_FACET_PACK >::comp_name
staticprivate
Initial value:
=
{"NONE", "FIXED", "RL", "DIFF", "DICT", "SPARSE", "COMPRESSED", "DAYS"}

Definition at line 648 of file sqltypes.h.

◆ comp_param

template<template< class > class... TYPE_FACET_PACK>
int SQLTypeInfoCore< TYPE_FACET_PACK >::comp_param
private

Definition at line 644 of file sqltypes.h.

◆ compression

template<template< class > class... TYPE_FACET_PACK>
EncodingType SQLTypeInfoCore< TYPE_FACET_PACK >::compression
private

Definition at line 643 of file sqltypes.h.

◆ dimension

template<template< class > class... TYPE_FACET_PACK>
int SQLTypeInfoCore< TYPE_FACET_PACK >::dimension
private

Definition at line 640 of file sqltypes.h.

◆ notnull

template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::notnull
private

Definition at line 642 of file sqltypes.h.

◆ scale

template<template< class > class... TYPE_FACET_PACK>
int SQLTypeInfoCore< TYPE_FACET_PACK >::scale
private

Definition at line 641 of file sqltypes.h.

◆ size

template<template< class > class... TYPE_FACET_PACK>
int SQLTypeInfoCore< TYPE_FACET_PACK >::size
private

Definition at line 645 of file sqltypes.h.

◆ subtype

template<template< class > class... TYPE_FACET_PACK>
SQLTypes SQLTypeInfoCore< TYPE_FACET_PACK >::subtype
private

Definition at line 639 of file sqltypes.h.

◆ type

template<template< class > class... TYPE_FACET_PACK>
SQLTypes SQLTypeInfoCore< TYPE_FACET_PACK >::type
private

◆ type_name

template<template< class > class... TYPE_FACET_PACK>
std::string SQLTypeInfoCore< TYPE_FACET_PACK >::type_name
staticprivate
Initial value:
= {
"NULL",
"BOOLEAN",
"CHAR",
"VARCHAR",
"NUMERIC",
"DECIMAL",
"INTEGER",
"SMALLINT",
"FLOAT",
"DOUBLE",
"TIME",
"TIMESTAMP",
"BIGINT",
"TEXT",
"DATE",
"ARRAY",
"INTERVAL_DAY_TIME",
"INTERVAL_YEAR_MONTH",
"POINT",
"LINESTRING",
"POLYGON",
"MULTIPOLYGON",
"TINYINT",
"GEOMETRY",
"GEOGRAPHY"}

Definition at line 647 of file sqltypes.h.


The documentation for this class was generated from the following file: