OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
 
std::string to_string () 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 276 of file sqltypes.h.

Constructor & Destructor Documentation

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 278 of file sqltypes.h.

279  : type(t)
280  , subtype(st)
281  , dimension(d)
282  , scale(s)
283  , notnull(n)
284  , compression(c)
285  , comp_param(p)
286  , size(get_storage_size()) {}
HOST DEVICE int get_storage_size() const
Definition: sqltypes.h:681
SQLTypes subtype
Definition: sqltypes.h:670
SQLTypes type
Definition: sqltypes.h:669
EncodingType compression
Definition: sqltypes.h:674
template<template< class > class... TYPE_FACET_PACK>
SQLTypeInfoCore< TYPE_FACET_PACK >::SQLTypeInfoCore ( SQLTypes  t,
int  d,
int  s,
bool  n 
)
inline

Definition at line 287 of file sqltypes.h.

288  : type(t)
289  , subtype(kNULLT)
290  , dimension(d)
291  , scale(s)
292  , notnull(n)
294  , comp_param(0)
295  , size(get_storage_size()) {}
HOST DEVICE int get_storage_size() const
Definition: sqltypes.h:681
SQLTypes subtype
Definition: sqltypes.h:670
SQLTypes type
Definition: sqltypes.h:669
EncodingType compression
Definition: sqltypes.h:674
template<template< class > class... TYPE_FACET_PACK>
SQLTypeInfoCore< TYPE_FACET_PACK >::SQLTypeInfoCore ( SQLTypes  t,
int  d,
int  s 
)
inline

Definition at line 296 of file sqltypes.h.

296 : SQLTypeInfoCore(t, d, s, false) {}
template<template< class > class... TYPE_FACET_PACK>
SQLTypeInfoCore< TYPE_FACET_PACK >::SQLTypeInfoCore ( SQLTypes  t,
bool  n 
)
inline

Definition at line 297 of file sqltypes.h.

298  : type(t)
299  , subtype(kNULLT)
300  , dimension(0)
301  , scale(0)
302  , notnull(n)
304  , comp_param(0)
305  , size(get_storage_size()) {}
HOST DEVICE int get_storage_size() const
Definition: sqltypes.h:681
SQLTypes subtype
Definition: sqltypes.h:670
SQLTypes type
Definition: sqltypes.h:669
EncodingType compression
Definition: sqltypes.h:674
template<template< class > class... TYPE_FACET_PACK>
SQLTypeInfoCore< TYPE_FACET_PACK >::SQLTypeInfoCore ( SQLTypes  t)
inline

Definition at line 306 of file sqltypes.h.

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

Definition at line 307 of file sqltypes.h.

308  : type(t)
309  , subtype(kNULLT)
310  , dimension(0)
311  , scale(0)
312  , notnull(n)
313  , compression(c)
314  , comp_param(0)
315  , size(get_storage_size()) {}
HOST DEVICE int get_storage_size() const
Definition: sqltypes.h:681
SQLTypes subtype
Definition: sqltypes.h:670
SQLTypes type
Definition: sqltypes.h:669
EncodingType compression
Definition: sqltypes.h:674
template<template< class > class... TYPE_FACET_PACK>
SQLTypeInfoCore< TYPE_FACET_PACK >::SQLTypeInfoCore ( )
inline

Definition at line 316 of file sqltypes.h.

Referenced by SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::get_array_type(), and SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::get_elem_type().

317  : type(kNULLT)
318  , subtype(kNULLT)
319  , dimension(0)
320  , scale(0)
321  , notnull(false)
323  , comp_param(0)
324  , size(0) {}
SQLTypes subtype
Definition: sqltypes.h:670
SQLTypes type
Definition: sqltypes.h:669
EncodingType compression
Definition: sqltypes.h:674

+ Here is the caller graph for this function:

Member Function Documentation

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

Definition at line 663 of file sqltypes.h.

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

663  {
664  return SQLTypeInfoCore(
666  }
SQLTypes type
Definition: sqltypes.h:669
EncodingType compression
Definition: sqltypes.h:674

+ Here is the caller graph for this function:

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

Definition at line 335 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(), CodeGenerator::codegen(), CodeGenerator::codegenCastFromString(), 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(), Catalog_Namespace::Catalog::doTruncateTable(), Analyzer::ColumnVar::get_comp_param(), anonymous_namespace{TypedDataAccessors.h}::get_element_size(), get_logical_type_info(), Catalog_Namespace::Catalog::getColumnDictDirectory(), 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(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::to_string(), Analyzer::UOper::toString(), RelAlgTranslator::translateBinaryGeoFunction(), RelAlgTranslator::translateUnaryGeoFunction(), ThriftSerializers::type_info_to_thrift(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), and File_Namespace::FileBuffer::writeMetadata().

335 { return comp_param; }

+ Here is the caller graph for this function:

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

Definition at line 334 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(), Importer_NS::TypedImportBuffer::clear(), 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(), Catalog_Namespace::Catalog::doTruncateTable(), encoding_to_thrift(), Executor::executeSimpleInsert(), extract_from_datum(), ChunkMetadata::fillChunkStats(), anonymous_namespace{ColumnarResults.cpp}::fixed_encoding_nullable_val(), Analyzer::ColumnVar::get_compression(), 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(), Catalog_Namespace::Catalog::getColumnDictDirectory(), Chunk_NS::Chunk::getNumElemsForBytesInsertData(), Importer_NS::Loader::getStringDict(), ResultSet::getTargetValueFromBufferRowwise(), Importer_NS::ImportDriver::importGeoTable(), 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(), Catalog_Namespace::Catalog::removeTableFromMap(), 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(), ExpressionRange::typeSupportsRange(), FixedLengthArrayNoneEncoder::update_elem_stats(), ArrayNoneEncoder::update_elem_stats(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), anonymous_namespace{InputMetadata.cpp}::uses_int_meta(), File_Namespace::FileBuffer::writeMetadata(), and Importer_NS::TypedImportBuffer::~TypedImportBuffer().

334 { return compression; }
EncodingType compression
Definition: sqltypes.h:674
template<template< class > class... TYPE_FACET_PACK>
std::string SQLTypeInfoCore< TYPE_FACET_PACK >::get_compression_name ( ) const
inline

Definition at line 454 of file sqltypes.h.

Referenced by Importer_NS::ImportDriver::importGeoTable(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::to_string(), Analyzer::UOper::toString(), and RexAgg::toString().

454 { return comp_name[(int)compression]; }
static std::string comp_name[kENCODING_LAST]
Definition: sqltypes.h:679
EncodingType compression
Definition: sqltypes.h:674

+ Here is the caller graph for this function:

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

Definition at line 328 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::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(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator!=(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator=(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator==(), parse_numeric(), Parser::InsertIntoTableAsSelectStmt::populateData(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), StringToDatum(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::to_string(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), and File_Namespace::FileBuffer::writeMetadata().

328 { return dimension; }

+ Here is the caller graph for this function:

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

Definition at line 659 of file sqltypes.h.

Referenced by Importer_NS::TypedImportBuffer::add_value(), Parser::FunctionRef::analyze(), anonymous_namespace{ResultSetIteration.cpp}::build_array_target_value(), CodeGenerator::codegenFunctionOperCastArgs(), ArrayConverterFactory< ELEMENT_FACTORY >::create(), DateDaysOverflowValidator::DateDaysOverflowValidator(), datum_to_string(), DecimalOverflowValidator::DecimalOverflowValidator(), Analyzer::Constant::do_cast(), Executor::executeSimpleInsert(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::get_type_name(), 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(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::to_string(), Analyzer::Constant::toString(), ThriftSerializers::type_info_to_thrift(), ExpressionRange::typeSupportsRange(), MapDHandler::value_to_thrift(), and MapDHandler::value_to_thrift_column().

659  {
660  return SQLTypeInfoCore(
662  }
SQLTypes subtype
Definition: sqltypes.h:670
EncodingType compression
Definition: sqltypes.h:674

+ Here is the caller graph for this function:

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

Definition at line 330 of file sqltypes.h.

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

330 { return dimension; }

+ Here is the caller graph for this function:

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

Definition at line 337 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().

337  {
340  return ti.get_size();
341  }
342  if (compression == kENCODING_DICT) {
343  return 4;
344  }
345  return get_size();
346  }
HOST DEVICE int get_size() const
Definition: sqltypes.h:336
SQLTypes subtype
Definition: sqltypes.h:670
SQLTypes type
Definition: sqltypes.h:669
EncodingType compression
Definition: sqltypes.h:674

+ Here is the caller graph for this function:

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

Definition at line 333 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(), ChunkIter_get_nth(), 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(), 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(), anonymous_namespace{ResultSetReductionJIT.cpp}::target_info_key(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::to_string(), ThriftSerializers::type_info_to_thrift(), MapDHandler::value_to_thrift_column(), DeepCopyVisitor::visitInIntegerSet(), and File_Namespace::FileBuffer::writeMetadata().

333 { return notnull; }

+ Here is the caller graph for this function:

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

Definition at line 347 of file sqltypes.h.

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

347  {
348  switch (type) {
349  case kPOINT:
350  return 1; // coords
351  case kLINESTRING:
352  return 2; // coords, bounds
353  case kPOLYGON:
354  return 4; // coords, ring_sizes, bounds, render_group
355  case kMULTIPOLYGON:
356  return 5; // coords, ring_sizes, poly_rings, bounds, render_group
357  default:
358  break;
359  }
360  return 0;
361  }
SQLTypes type
Definition: sqltypes.h:669

+ Here is the caller graph for this function:

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

Definition at line 362 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().

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

+ Here is the caller graph for this function:

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

Definition at line 329 of file sqltypes.h.

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

329 { return dimension; }

+ Here is the caller graph for this function:

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

Definition at line 331 of file sqltypes.h.

Referenced by Catalog_Namespace::Catalog::addColumn(), Analyzer::BinOper::analyze_type_info(), Analyzer::Constant::cast_number(), 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(), Importer_NS::ImportDriver::importGeoTable(), 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(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::to_string(), 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().

331 { return scale; }

+ Here is the caller graph for this function:

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

Definition at line 336 of file sqltypes.h.

Referenced by Importer_NS::TypedImportBuffer::add_value(), Catalog_Namespace::Catalog::addColumn(), Importer_NS::TypedImportBuffer::addDictEncodedString(), Chunk_NS::Chunk::begin_iterator(), anonymous_namespace{CastIR.cpp}::byte_array_cast(), CodeGenerator::castArrayPointer(), Importer_NS::TypedImportBuffer::clear(), 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(), 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(), Importer_NS::TypedImportBuffer::getStringDictBuffer(), 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(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::to_string(), ThriftSerializers::type_info_to_thrift(), Importer_NS::TypedImportBuffer::TypedImportBuffer(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumns(), File_Namespace::FileBuffer::writeMetadata(), and Importer_NS::TypedImportBuffer::~TypedImportBuffer().

336 { return size; }
template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE int SQLTypeInfoCore< TYPE_FACET_PACK >::get_storage_size ( ) const
inlineprivate

Definition at line 681 of file sqltypes.h.

Referenced by SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::set_fixed_size().

681  {
682  switch (type) {
683  case kBOOLEAN:
684  return sizeof(int8_t);
685  case kTINYINT:
686  return sizeof(int8_t);
687  case kSMALLINT:
688  switch (compression) {
689  case kENCODING_NONE:
690  return sizeof(int16_t);
691  case kENCODING_FIXED:
692  case kENCODING_SPARSE:
693  return comp_param / 8;
694  case kENCODING_RL:
695  case kENCODING_DIFF:
696  break;
697  default:
698  assert(false);
699  }
700  break;
701  case kINT:
702  switch (compression) {
703  case kENCODING_NONE:
704  return sizeof(int32_t);
705  case kENCODING_FIXED:
706  case kENCODING_SPARSE:
707  return comp_param / 8;
708  case kENCODING_RL:
709  case kENCODING_DIFF:
710  break;
711  default:
712  assert(false);
713  }
714  break;
715  case kBIGINT:
716  case kNUMERIC:
717  case kDECIMAL:
718  switch (compression) {
719  case kENCODING_NONE:
720  return sizeof(int64_t);
721  case kENCODING_FIXED:
722  case kENCODING_SPARSE:
723  return comp_param / 8;
724  case kENCODING_RL:
725  case kENCODING_DIFF:
726  break;
727  default:
728  assert(false);
729  }
730  break;
731  case kFLOAT:
732  switch (compression) {
733  case kENCODING_NONE:
734  return sizeof(float);
735  case kENCODING_FIXED:
736  case kENCODING_RL:
737  case kENCODING_DIFF:
738  case kENCODING_SPARSE:
739  assert(false);
740  break;
741  default:
742  assert(false);
743  }
744  break;
745  case kDOUBLE:
746  switch (compression) {
747  case kENCODING_NONE:
748  return sizeof(double);
749  case kENCODING_FIXED:
750  case kENCODING_RL:
751  case kENCODING_DIFF:
752  case kENCODING_SPARSE:
753  assert(false);
754  break;
755  default:
756  assert(false);
757  }
758  break;
759  case kTIMESTAMP:
760  case kTIME:
761  case kINTERVAL_DAY_TIME:
763  case kDATE:
764  switch (compression) {
765  case kENCODING_NONE:
766  return sizeof(int64_t);
767  case kENCODING_FIXED:
768  if (type == kTIMESTAMP && dimension > 0) {
769  assert(false); // disable compression for timestamp precisions
770  }
771  return comp_param / 8;
772  case kENCODING_RL:
773  case kENCODING_DIFF:
774  case kENCODING_SPARSE:
775  assert(false);
776  break;
778  switch (comp_param) {
779  case 0:
780  return 4; // Default date encoded in days is 32 bits
781  case 16:
782  case 32:
783  return comp_param / 8;
784  default:
785  assert(false);
786  break;
787  }
788  default:
789  assert(false);
790  }
791  break;
792  case kTEXT:
793  case kVARCHAR:
794  case kCHAR:
795  if (compression == kENCODING_DICT) {
796  return sizeof(int32_t); // @TODO(wei) must check DictDescriptor
797  }
798  break;
799  case kARRAY:
800  // TODO: return size for fixlen arrays?
801  break;
802  case kPOINT:
803  case kLINESTRING:
804  case kPOLYGON:
805  case kMULTIPOLYGON:
806  break;
807  default:
808  break;
809  }
810  return -1;
811  }
Definition: sqltypes.h:52
Definition: sqltypes.h:55
Definition: sqltypes.h:56
int64_t const int32_t sz assert(dest)
Definition: sqltypes.h:44
Definition: sqltypes.h:48
SQLTypes type
Definition: sqltypes.h:669
EncodingType compression
Definition: sqltypes.h:674

+ Here is the caller graph for this function:

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

Definition at line 327 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(), Importer_NS::TypedImportBuffer::clear(), 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==(), Importer_NS::TypedImportBuffer::pop_value(), 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(), File_Namespace::FileBuffer::writeMetadata(), and Importer_NS::TypedImportBuffer::~TypedImportBuffer().

327 { return subtype; }
SQLTypes subtype
Definition: sqltypes.h:670

+ Here is the caller graph for this function:

template<template< class > class... TYPE_FACET_PACK>
HOST DEVICE SQLTypes SQLTypeInfoCore< TYPE_FACET_PACK >::get_type ( ) 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::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(), Importer_NS::TypedImportBuffer::clear(), 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(), Importer_NS::TypedImportBuffer::getAsBytes(), Chunk_NS::Chunk::getChunkBuffer(), Importer_NS::TypedImportBuffer::getElementSize(), 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(), Importer_NS::Importer::importDelimited(), Importer_NS::Importer::importGDAL(), Importer_NS::ImportDriver::importGeoTable(), 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(), Importer_NS::TypedImportBuffer::pop_value(), 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(), 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(), File_Namespace::FileBuffer::writeMetadata(), and Importer_NS::TypedImportBuffer::~TypedImportBuffer().

326 { return type; }
SQLTypes type
Definition: sqltypes.h:669
template<template< class > class... TYPE_FACET_PACK>
std::string SQLTypeInfoCore< TYPE_FACET_PACK >::get_type_name ( ) const
inline

Definition at line 429 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(), Analyzer::Constant::do_cast(), ArrowResultSetConverter::getArrowType(), Importer_NS::ImportDriver::importGeoTable(), Data_Namespace::AbstractBuffer::initEncoder(), ResultSet::makeGeoTargetValue(), anonymous_namespace{ExtensionFunctionsBinding.cpp}::match_arguments(), pair_to_double(), Parser::InsertIntoTableAsSelectStmt::populateData(), Fragmenter_Namespace::sizeOfRawColumn(), StringToDatum(), anonymous_namespace{ResultSetReductionJIT.cpp}::target_info_key(), Analyzer::ColumnVar::toString(), Analyzer::UOper::toString(), RexAgg::toString(), and anonymous_namespace{ArrowImporter.h}::type_conversion_error().

429  {
430  if (IS_GEO(type)) {
431  std::string srid_string = "";
432  if (get_output_srid() > 0) {
433  srid_string = ", " + std::to_string(get_output_srid());
434  }
435  CHECK_LT(static_cast<int>(subtype), kSQLTYPE_LAST);
436  return type_name[static_cast<int>(subtype)] + "(" +
437  type_name[static_cast<int>(type)] + srid_string + ")";
438  }
439  std::string ps = "";
440  if (type == kDECIMAL || type == kNUMERIC || subtype == kDECIMAL ||
441  subtype == kNUMERIC) {
442  ps = "(" + std::to_string(dimension) + "," + std::to_string(scale) + ")";
443  } else if (type == kTIMESTAMP) {
444  ps = "(" + std::to_string(dimension) + ")";
445  }
446  if (type == kARRAY) {
447  auto elem_ti = get_elem_type();
448  auto num_elems = (size > 0) ? std::to_string(size / elem_ti.get_size()) : "";
449  CHECK_LT(static_cast<int>(subtype), kSQLTYPE_LAST);
450  return type_name[static_cast<int>(subtype)] + ps + "[" + num_elems + "]";
451  }
452  return type_name[static_cast<int>(type)] + ps;
453  }
HOST DEVICE int get_output_srid() const
Definition: sqltypes.h:332
std::string to_string(char const *&&v)
static std::string type_name[kSQLTYPE_LAST]
Definition: sqltypes.h:678
SQLTypes subtype
Definition: sqltypes.h:670
#define CHECK_LT(x, y)
Definition: Logger.h:200
SQLTypeInfoCore get_elem_type() const
Definition: sqltypes.h:659
SQLTypes type
Definition: sqltypes.h:669
#define IS_GEO(T)
Definition: sqltypes.h:167

+ Here is the caller graph for this function:

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

Definition at line 395 of file sqltypes.h.

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

395  {
396  switch (type) {
397  case kLINESTRING:
398  case kPOLYGON:
399  case kMULTIPOLYGON:
400  return true;
401  default:
402  break;
403  }
404  return false;
405  }
SQLTypes type
Definition: sqltypes.h:669

+ Here is the caller graph for this function:

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

Definition at line 406 of file sqltypes.h.

Referenced by RelAlgTranslator::translateGeoColumn().

406  {
407  switch (type) {
408  case kPOLYGON:
409  case kMULTIPOLYGON:
410  return true;
411  default:
412  break;
413  }
414  return false;
415  }
SQLTypes type
Definition: sqltypes.h:669

+ Here is the caller graph for this function:

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

Definition at line 485 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(), 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(), ExpressionRange::typeSupportsRange(), MapDHandler::value_to_thrift(), and MapDHandler::value_to_thrift_column().

485 { return type == kARRAY; }
SQLTypes type
Definition: sqltypes.h:669

+ Here is the caller graph for this function:

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 537 of file sqltypes.h.

Referenced by Analyzer::Expr::add_cast(), and SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_castable().

537  {
538  // can always cast between the same type but different precision/scale/encodings
539  if (type == new_type_info.get_type()) {
540  return true;
541  // can always cast from or to string
542  } else if (is_string() || new_type_info.is_string()) {
543  return true;
544  // can cast between numbers
545  } else if (is_number() && new_type_info.is_number()) {
546  return true;
547  // can cast from timestamp or date to number (epoch)
548  } else if ((type == kTIMESTAMP || type == kDATE) && new_type_info.is_number()) {
549  return true;
550  // can cast from date to timestamp
551  } else if (type == kDATE && new_type_info.get_type() == kTIMESTAMP) {
552  return true;
553  } else if (type == kTIMESTAMP && new_type_info.get_type() == kDATE) {
554  return true;
555  } else if (type == kBOOLEAN && new_type_info.is_number()) {
556  return true;
557  } else if (type == kARRAY && new_type_info.get_type() == kARRAY) {
558  return get_elem_type().is_castable(new_type_info.get_elem_type());
559  } else {
560  return false;
561  }
562  }
bool is_castable(const SQLTypeInfoCore &new_type_info) const
Definition: sqltypes.h:537
bool is_number() const
Definition: sqltypes.h:482
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:326
Definition: sqltypes.h:56
bool is_string() const
Definition: sqltypes.h:477
SQLTypeInfoCore get_elem_type() const
Definition: sqltypes.h:659
SQLTypes type
Definition: sqltypes.h:669

+ Here is the caller graph for this function:

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

Definition at line 480 of file sqltypes.h.

Referenced by Importer_NS::TypedImportBuffer::add_arrow_values(), Importer_NS::TypedImportBuffer::add_value(), Analyzer::BinOper::analyze_type_info(), CodeGenerator::checkExpressionRanges(), 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(), Importer_NS::TypedImportBuffer::pop_value(), Parser::InsertIntoTableAsSelectStmt::populateData(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), Executor::reduceResults(), Parser::DDLStmt::setColumnDescriptor(), Importer_NS::TDatumToDatum(), RelAlgTranslator::translateFunction(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumnMetadata(), anonymous_namespace{InputMetadata.cpp}::uses_int_meta(), and anonymous_namespace{ExpressionRewrite.cpp}::ConstantFoldingVisitor::visitBinOper().

480 { return type == kDECIMAL || type == kNUMERIC; }
SQLTypes type
Definition: sqltypes.h:669

+ Here is the caller graph for this function:

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

Definition at line 503 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().

503  {
504  return is_string() && compression == kENCODING_DICT;
505  }
bool is_string() const
Definition: sqltypes.h:477
EncodingType compression
Definition: sqltypes.h:674

+ Here is the caller graph for this function:

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

Definition at line 487 of file sqltypes.h.

Referenced by Chunk_NS::Chunk::createChunkBuffer(), Chunk_NS::Chunk::getChunkBuffer(), Chunk_NS::Chunk::init_encoder(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_varlen_indeed(), and Chunk_NS::Chunk::isChunkOnDevice().

487 { return type == kARRAY && size > 0; }
SQLTypes type
Definition: sqltypes.h:669

+ Here is the caller graph for this function:

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

Definition at line 564 of file sqltypes.h.

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

564  {
565  // assuming Datum is always uncompressed
566  switch (type) {
567  case kBOOLEAN:
568  return (int8_t)d.boolval == NULL_BOOLEAN;
569  case kTINYINT:
570  return d.tinyintval == NULL_TINYINT;
571  case kSMALLINT:
572  return d.smallintval == NULL_SMALLINT;
573  case kINT:
574  return d.intval == NULL_INT;
575  case kBIGINT:
576  case kNUMERIC:
577  case kDECIMAL:
578  return d.bigintval == NULL_BIGINT;
579  case kFLOAT:
580  return d.floatval == NULL_FLOAT;
581  case kDOUBLE:
582  return d.doubleval == NULL_DOUBLE;
583  case kTIME:
584  case kTIMESTAMP:
585  case kDATE:
586  return d.bigintval == NULL_BIGINT;
587  case kTEXT:
588  case kVARCHAR:
589  case kCHAR:
590  // @TODO handle null strings
591  break;
592  case kNULLT:
593  return true;
594  case kARRAY:
595  return d.arrayval == NULL || d.arrayval->is_null;
596  default:
597  break;
598  }
599  return false;
600  }
int8_t tinyintval
Definition: sqltypes.h:126
#define NULL_DOUBLE
Definition: sqltypes.h:179
Definition: sqltypes.h:52
bool is_null
Definition: sqltypes.h:76
#define NULL_BIGINT
Definition: sqltypes.h:177
bool boolval
Definition: sqltypes.h:125
VarlenDatum * arrayval
Definition: sqltypes.h:132
int32_t intval
Definition: sqltypes.h:128
float floatval
Definition: sqltypes.h:130
#define NULL_TINYINT
Definition: sqltypes.h:174
int64_t bigintval
Definition: sqltypes.h:129
#define NULL_FLOAT
Definition: sqltypes.h:178
int16_t smallintval
Definition: sqltypes.h:127
#define NULL_INT
Definition: sqltypes.h:176
Definition: sqltypes.h:55
Definition: sqltypes.h:56
Definition: sqltypes.h:44
#define NULL_SMALLINT
Definition: sqltypes.h:175
Definition: sqltypes.h:48
SQLTypes type
Definition: sqltypes.h:669
#define NULL_BOOLEAN
Definition: sqltypes.h:173
double doubleval
Definition: sqltypes.h:131

+ Here is the caller graph for this function:

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 601 of file sqltypes.h.

601  {
602  if (type == kFLOAT) {
603  return *(float*)val == NULL_FLOAT;
604  }
605  if (type == kDOUBLE) {
606  return *(double*)val == NULL_DOUBLE;
607  }
608  // val can be either compressed or uncompressed
609  switch (size) {
610  case 1:
611  return *val == NULL_TINYINT;
612  case 2:
613  return *(int16_t*)val == NULL_SMALLINT;
614  case 4:
615  return *(int32_t*)val == NULL_INT;
616  case 8:
617  return *(int64_t*)val == NULL_BIGINT;
618  case kNULLT:
619  return true;
620  default:
621  // @TODO(wei) handle null strings
622  break;
623  }
624  return false;
625  }
#define NULL_DOUBLE
Definition: sqltypes.h:179
#define NULL_BIGINT
Definition: sqltypes.h:177
#define NULL_TINYINT
Definition: sqltypes.h:174
#define NULL_FLOAT
Definition: sqltypes.h:178
#define NULL_INT
Definition: sqltypes.h:176
#define NULL_SMALLINT
Definition: sqltypes.h:175
SQLTypes type
Definition: sqltypes.h:669
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 626 of file sqltypes.h.

Referenced by ChunkIter_get_nth().

626  {
627  // Check if fixed length array has a NULL_ARRAY sentinel as the first element
628  if (type == kARRAY && val && array_size > 0 && array_size == size) {
629  // Need to create element type to get the size, but can't call get_elem_type()
630  // since this is a HOST DEVICE function. Going through copy constructor instead.
631  auto elem_ti{*this};
632  elem_ti.set_type(subtype);
633  elem_ti.set_subtype(kNULLT);
634  auto elem_size = elem_ti.get_storage_size();
635  if (elem_size < 1) {
636  return false;
637  }
638  if (subtype == kFLOAT) {
639  return *(float*)val == NULL_ARRAY_FLOAT;
640  }
641  if (subtype == kDOUBLE) {
642  return *(double*)val == NULL_ARRAY_DOUBLE;
643  }
644  switch (elem_size) {
645  case 1:
646  return *val == NULL_ARRAY_TINYINT;
647  case 2:
648  return *(int16_t*)val == NULL_ARRAY_SMALLINT;
649  case 4:
650  return *(int32_t*)val == NULL_ARRAY_INT;
651  case 8:
652  return *(int64_t*)val == NULL_ARRAY_BIGINT;
653  default:
654  return false;
655  }
656  }
657  return false;
658  }
#define NULL_ARRAY_DOUBLE
Definition: sqltypes.h:187
#define NULL_ARRAY_SMALLINT
Definition: sqltypes.h:183
#define NULL_ARRAY_TINYINT
Definition: sqltypes.h:182
#define NULL_ARRAY_INT
Definition: sqltypes.h:184
SQLTypes subtype
Definition: sqltypes.h:670
#define NULL_ARRAY_BIGINT
Definition: sqltypes.h:185
SQLTypes type
Definition: sqltypes.h:669
#define NULL_ARRAY_FLOAT
Definition: sqltypes.h:186

+ Here is the caller graph for this function:

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

Definition at line 477 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(), Parser::InsertValuesStmt::determineLeafIndex(), Analyzer::Constant::do_cast(), Executor::executeSimpleInsert(), get_agg_initial_val(), anonymous_namespace{TargetExprBuilder.cpp}::get_initial_agg_val(), Catalog_Namespace::Catalog::getColumnDictDirectory(), Importer_NS::Loader::getStringDict(), ResultSet::getTargetValueFromBufferRowwise(), CodeGenerator::hashJoinLhs(), Importer_NS::ImportDriver::importGeoTable(), inline_fixed_encoding_null_val(), inline_int_null_val(), anonymous_namespace{Execute.cpp}::inline_null_val(), CgenState::inlineIntNull(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_castable(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_dict_encoded_string(), 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(), ExpressionRange::typeSupportsRange(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumns(), anonymous_namespace{InputMetadata.cpp}::uses_int_meta(), and Analyzer::Constant::~Constant().

477 { return IS_STRING(type); }
#define IS_STRING(T)
Definition: sqltypes.h:166
SQLTypes type
Definition: sqltypes.h:669
template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_string_array ( ) const
inline

Definition at line 478 of file sqltypes.h.

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

478 { return (type == kARRAY) && IS_STRING(subtype); }
SQLTypes subtype
Definition: sqltypes.h:670
#define IS_STRING(T)
Definition: sqltypes.h:166
SQLTypes type
Definition: sqltypes.h:669

+ Here is the caller graph for this function:

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

Definition at line 486 of file sqltypes.h.

486 { return type == kARRAY && size <= 0; }
SQLTypes type
Definition: sqltypes.h:669
template<template< class > class... TYPE_FACET_PACK>
bool SQLTypeInfoCore< TYPE_FACET_PACK >::is_varlen_indeed ( ) const
inline

Definition at line 497 of file sqltypes.h.

497  {
498  // SQLTypeInfo.is_varlen() is broken with fixedlen array now
499  // and seems left broken for some concern, so fix it locally
500  return is_varlen() && !is_fixlen_array();
501  }
bool is_varlen() const
Definition: sqltypes.h:491
bool is_fixlen_array() const
Definition: sqltypes.h:487
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 507 of file sqltypes.h.

507  {
508  return type != rhs.get_type() || subtype != rhs.get_subtype() ||
509  dimension != rhs.get_dimension() || scale != rhs.get_scale() ||
510  compression != rhs.get_compression() ||
513  notnull != rhs.get_notnull();
514  }
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:334
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:335
HOST DEVICE int get_scale() const
Definition: sqltypes.h:331
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:326
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:333
SQLTypes subtype
Definition: sqltypes.h:670
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:328
HOST DEVICE SQLTypes get_subtype() const
Definition: sqltypes.h:327
SQLTypes type
Definition: sqltypes.h:669
#define TRANSIENT_DICT(ID)
Definition: sqltypes.h:190
EncodingType compression
Definition: sqltypes.h:674
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 525 of file sqltypes.h.

525  {
526  type = rhs.get_type();
527  subtype = rhs.get_subtype();
528  dimension = rhs.get_dimension();
529  scale = rhs.get_scale();
530  notnull = rhs.get_notnull();
532  comp_param = rhs.get_comp_param();
533  size = rhs.get_size();
534  return (*this);
535  }
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:334
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:335
HOST DEVICE int get_scale() const
Definition: sqltypes.h:331
HOST DEVICE int get_size() const
Definition: sqltypes.h:336
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:326
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:333
SQLTypes subtype
Definition: sqltypes.h:670
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:328
HOST DEVICE SQLTypes get_subtype() const
Definition: sqltypes.h:327
SQLTypes type
Definition: sqltypes.h:669
EncodingType compression
Definition: sqltypes.h:674
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 515 of file sqltypes.h.

515  {
516  return type == rhs.get_type() && subtype == rhs.get_subtype() &&
517  dimension == rhs.get_dimension() && scale == rhs.get_scale() &&
518  compression == rhs.get_compression() &&
521  notnull == rhs.get_notnull();
522  }
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:334
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:335
HOST DEVICE int get_scale() const
Definition: sqltypes.h:331
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:326
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:333
SQLTypes subtype
Definition: sqltypes.h:670
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:328
HOST DEVICE SQLTypes get_subtype() const
Definition: sqltypes.h:327
SQLTypes type
Definition: sqltypes.h:669
#define TRANSIENT_DICT(ID)
Definition: sqltypes.h:190
EncodingType compression
Definition: sqltypes.h:674
template<template< class > class... TYPE_FACET_PACK>
void SQLTypeInfoCore< TYPE_FACET_PACK >::set_comp_param ( int  p)
inline
template<template< class > class... TYPE_FACET_PACK>
void SQLTypeInfoCore< TYPE_FACET_PACK >::set_compression ( EncodingType  c)
inline
template<template< class > class... TYPE_FACET_PACK>
void SQLTypeInfoCore< TYPE_FACET_PACK >::set_dimension ( int  d)
inline

Definition at line 418 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().

418 { dimension = d; }

+ Here is the caller graph for this function:

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

Definition at line 425 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().

425 { size = get_storage_size(); }
HOST DEVICE int get_storage_size() const
Definition: sqltypes.h:681

+ Here is the caller graph for this function:

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

Definition at line 420 of file sqltypes.h.

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

420 { dimension = d; }

+ Here is the caller graph for this function:

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

Definition at line 423 of file sqltypes.h.

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

423 { notnull = n; }

+ Here is the caller graph for this function:

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

Definition at line 422 of file sqltypes.h.

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

422 { scale = s; }

+ Here is the caller graph for this function:

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

Definition at line 419 of file sqltypes.h.

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

419 { dimension = d; }

+ Here is the caller graph for this function:

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

Definition at line 424 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().

424 { size = s; }

+ Here is the caller graph for this function:

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

Definition at line 416 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().

416 { type = t; }
SQLTypes type
Definition: sqltypes.h:669

+ Here is the caller graph for this function:

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

Definition at line 455 of file sqltypes.h.

455  {
456  return concat("(",
457  type_name[static_cast<int>(type)],
458  ", ",
459  get_dimension(),
460  ", ",
461  get_scale(),
462  ", ",
463  get_notnull() ? "not nullable" : "nullable",
464  ", ",
466  ", ",
467  get_comp_param(),
468  ", ",
469  type_name[static_cast<int>(subtype)],
470  ": ",
471  get_size(),
472  ": ",
474  ")");
475  }
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:335
HOST DEVICE int get_scale() const
Definition: sqltypes.h:331
HOST DEVICE int get_size() const
Definition: sqltypes.h:336
static std::string type_name[kSQLTYPE_LAST]
Definition: sqltypes.h:678
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:333
SQLTypes subtype
Definition: sqltypes.h:670
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:328
SQLTypeInfoCore get_elem_type() const
Definition: sqltypes.h:659
SQLTypes type
Definition: sqltypes.h:669
std::string get_compression_name() const
Definition: sqltypes.h:454

Member Data Documentation

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 679 of file sqltypes.h.

Referenced by SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::get_compression_name().

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

Definition at line 669 of file sqltypes.h.

Referenced by MapDHandler::convert_target_metainfo(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::get_array_type(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::get_logical_size(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::get_physical_cols(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::get_physical_coord_cols(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::get_storage_size(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::get_type(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::get_type_name(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::has_bounds(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::has_render_group(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_array(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_boolean(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_castable(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_decimal(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_fixlen_array(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_fp(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_geometry(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_integer(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_null(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_null_fixlen_array(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_number(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_string(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_string_array(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_time(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_timeinterval(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_varlen(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::is_varlen_array(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator!=(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator=(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::operator==(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::set_type(), SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::to_string(), and anonymous_namespace{ArrowResultSet.cpp}::type_from_arrow_field().

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",
"EVAL_CONTEXT_TYPE",
"VOID",
"CURSOR"}

Definition at line 678 of file sqltypes.h.

Referenced by SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::get_type_name(), and SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities >::to_string().


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