OmniSciDB  21ac014ffc
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SQLTypeInfo Class Reference

#include <sqltypes.h>

Public Member Functions

 SQLTypeInfo (SQLTypes t, int d, int s, bool n, EncodingType c, int p, SQLTypes st)
 
 SQLTypeInfo (SQLTypes t, int d, int s, bool n)
 
 SQLTypeInfo (SQLTypes t, EncodingType c, int p, SQLTypes st)
 
 SQLTypeInfo (SQLTypes t, int d, int s)
 
 SQLTypeInfo (SQLTypes t, bool n)
 
 SQLTypeInfo (SQLTypes t)
 
 SQLTypeInfo (SQLTypes t, bool n, EncodingType c)
 
 SQLTypeInfo ()
 
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 toString () const
 
std::string to_string () const
 
std::string get_buffer_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_column () const
 
bool is_column_list () const
 
bool is_bytes () const
 
bool is_buffer () const
 
bool transforms () const
 
bool is_varlen () const
 
bool is_varlen_indeed () const
 
bool is_dict_encoded_string () const
 
bool is_subtype_dict_encoded_string () const
 
bool is_dict_encoded_type () const
 
HOST DEVICE bool operator!= (const SQLTypeInfo &rhs) const
 
HOST DEVICE bool operator== (const SQLTypeInfo &rhs) const
 
int get_array_context_logical_size () const
 
HOST DEVICE void operator= (const SQLTypeInfo &rhs)
 
bool is_castable (const SQLTypeInfo &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
 
HOST DEVICE bool is_null_point_coord_array (const int8_t *val, int array_size) const
 
SQLTypeInfo get_elem_type () const
 
SQLTypeInfo get_array_type () const
 
bool is_date_in_days () const
 
bool is_date () const
 
bool is_high_precision_timestamp () const
 
bool is_timestamp () 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

Definition at line 264 of file sqltypes.h.

Constructor & Destructor Documentation

SQLTypeInfo::SQLTypeInfo ( SQLTypes  t,
int  d,
int  s,
bool  n,
EncodingType  c,
int  p,
SQLTypes  st 
)
inline

Definition at line 266 of file sqltypes.h.

267  : type(t)
268  , subtype(st)
269  , dimension(d)
270  , scale(s)
271  , notnull(n)
272  , compression(c)
273  , comp_param(p)
274  , size(get_storage_size()) {}
tuple d
Definition: test_fsi.py:9
SQLTypes subtype
Definition: sqltypes.h:760
bool notnull
Definition: sqltypes.h:764
EncodingType compression
Definition: sqltypes.h:765
HOST DEVICE int get_storage_size() const
Definition: sqltypes.h:772
char * t
SQLTypes type
Definition: sqltypes.h:759
int comp_param
Definition: sqltypes.h:766
int dimension
Definition: sqltypes.h:761
SQLTypeInfo::SQLTypeInfo ( SQLTypes  t,
int  d,
int  s,
bool  n 
)
inline

Definition at line 275 of file sqltypes.h.

276  : type(t)
277  , subtype(kNULLT)
278  , dimension(d)
279  , scale(s)
280  , notnull(n)
282  , comp_param(0)
283  , size(get_storage_size()) {}
tuple d
Definition: test_fsi.py:9
SQLTypes subtype
Definition: sqltypes.h:760
bool notnull
Definition: sqltypes.h:764
EncodingType compression
Definition: sqltypes.h:765
HOST DEVICE int get_storage_size() const
Definition: sqltypes.h:772
char * t
SQLTypes type
Definition: sqltypes.h:759
int comp_param
Definition: sqltypes.h:766
int dimension
Definition: sqltypes.h:761
SQLTypeInfo::SQLTypeInfo ( SQLTypes  t,
EncodingType  c,
int  p,
SQLTypes  st 
)
inline

Definition at line 284 of file sqltypes.h.

285  : type(t)
286  , subtype(st)
287  , dimension(0)
288  , scale(0)
289  , notnull(false)
290  , compression(c)
291  , comp_param(p)
292  , size(get_storage_size()) {}
SQLTypes subtype
Definition: sqltypes.h:760
bool notnull
Definition: sqltypes.h:764
EncodingType compression
Definition: sqltypes.h:765
HOST DEVICE int get_storage_size() const
Definition: sqltypes.h:772
char * t
SQLTypes type
Definition: sqltypes.h:759
int comp_param
Definition: sqltypes.h:766
int dimension
Definition: sqltypes.h:761
SQLTypeInfo::SQLTypeInfo ( SQLTypes  t,
int  d,
int  s 
)
inline

Definition at line 293 of file sqltypes.h.

293 : SQLTypeInfo(t, d, s, false) {}
tuple d
Definition: test_fsi.py:9
char * t
SQLTypeInfo::SQLTypeInfo ( SQLTypes  t,
bool  n 
)
inline

Definition at line 294 of file sqltypes.h.

295  : type(t)
296  , subtype(kNULLT)
297  , dimension(0)
298  , scale(0)
299  , notnull(n)
301  , comp_param(0)
302  , size(get_storage_size()) {}
SQLTypes subtype
Definition: sqltypes.h:760
bool notnull
Definition: sqltypes.h:764
EncodingType compression
Definition: sqltypes.h:765
HOST DEVICE int get_storage_size() const
Definition: sqltypes.h:772
char * t
SQLTypes type
Definition: sqltypes.h:759
int comp_param
Definition: sqltypes.h:766
int dimension
Definition: sqltypes.h:761
SQLTypeInfo::SQLTypeInfo ( SQLTypes  t)
inline

Definition at line 303 of file sqltypes.h.

303 : SQLTypeInfo(t, false) {}
char * t
SQLTypeInfo::SQLTypeInfo ( SQLTypes  t,
bool  n,
EncodingType  c 
)
inline

Definition at line 304 of file sqltypes.h.

305  : type(t)
306  , subtype(kNULLT)
307  , dimension(0)
308  , scale(0)
309  , notnull(n)
310  , compression(c)
311  , comp_param(0)
312  , size(get_storage_size()) {}
SQLTypes subtype
Definition: sqltypes.h:760
bool notnull
Definition: sqltypes.h:764
EncodingType compression
Definition: sqltypes.h:765
HOST DEVICE int get_storage_size() const
Definition: sqltypes.h:772
char * t
SQLTypes type
Definition: sqltypes.h:759
int comp_param
Definition: sqltypes.h:766
int dimension
Definition: sqltypes.h:761
SQLTypeInfo::SQLTypeInfo ( )
inline

Definition at line 313 of file sqltypes.h.

Referenced by get_array_type(), and get_elem_type().

314  : type(kNULLT)
315  , subtype(kNULLT)
316  , dimension(0)
317  , scale(0)
318  , notnull(false)
320  , comp_param(0)
321  , size(0) {}
SQLTypes subtype
Definition: sqltypes.h:760
bool notnull
Definition: sqltypes.h:764
EncodingType compression
Definition: sqltypes.h:765
SQLTypes type
Definition: sqltypes.h:759
int comp_param
Definition: sqltypes.h:766
int dimension
Definition: sqltypes.h:761

+ Here is the caller graph for this function:

Member Function Documentation

int SQLTypeInfo::get_array_context_logical_size ( ) const
inline

Definition at line 565 of file sqltypes.h.

References get_compression(), get_logical_size(), is_string(), kENCODING_DICT, kENCODING_FIXED, and kENCODING_NONE.

Referenced by ResultSet::makeVarlenTargetValue().

565  {
566  if (is_string()) {
567  auto comp_type(get_compression());
568  if (comp_type == kENCODING_DICT || comp_type == kENCODING_FIXED ||
569  comp_type == kENCODING_NONE) {
570  return sizeof(int32_t);
571  }
572  }
573  return get_logical_size();
574  }
int get_logical_size() const
Definition: sqltypes.h:334
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:331
bool is_string() const
Definition: sqltypes.h:498

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

SQLTypeInfo SQLTypeInfo::get_array_type ( ) const
inline

Definition at line 730 of file sqltypes.h.

References comp_param, compression, dimension, kARRAY, notnull, scale, SQLTypeInfo(), and type.

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

730  {
732  }
bool notnull
Definition: sqltypes.h:764
EncodingType compression
Definition: sqltypes.h:765
SQLTypes type
Definition: sqltypes.h:759
int comp_param
Definition: sqltypes.h:766
int dimension
Definition: sqltypes.h:761

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string SQLTypeInfo::get_buffer_name ( ) const
inline

Definition at line 487 of file sqltypes.h.

References is_array(), is_bytes(), and is_column().

487  {
488  if (is_array())
489  return "Array";
490  if (is_bytes())
491  return "Bytes";
492  if (is_column())
493  return "Column";
494  assert(false);
495  return "";
496  }
bool is_column() const
Definition: sqltypes.h:511
bool is_bytes() const
Definition: sqltypes.h:513
bool is_array() const
Definition: sqltypes.h:506

+ Here is the call graph for this function:

HOST DEVICE int SQLTypeInfo::get_comp_param ( ) const
inline

Definition at line 332 of file sqltypes.h.

References comp_param.

Referenced by Analyzer::Expr::add_cast(), Analyzer::UOper::add_cast(), Analyzer::CaseExpr::add_cast(), Catalog_Namespace::Catalog::addColumn(), Catalog_Namespace::Catalog::addReferenceToForeignDict(), bind_function(), RelLogicalUnion::checkForMatchingMetaInfoTypes(), CodeGenerator::codegen(), CodeGenerator::codegenCastFromString(), CodeGenerator::codegenCompression(), Analyzer::BinOper::common_string_type(), import_export::ImporterUtils::composeNullPointCoords(), Geospatial::compress_coord(), Geospatial::compress_coords(), Geospatial::compress_null_point(), DictionaryConverterFactory< TARGET_TYPE >::create(), Encoder::Create(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::create_parquet_decimal_encoder(), Catalog_Namespace::Catalog::createTable(), DateDaysOverflowValidator::DateDaysOverflowValidator(), decompress(), Catalog_Namespace::Catalog::delDictionary(), Parser::InsertValuesStmt::determineLeafIndex(), DictionaryValueConverter< TARGET_TYPE >::DictionaryValueConverter(), Catalog_Namespace::Catalog::doTruncateTable(), import_export::fill_missing_columns(), Catalog_Namespace::Catalog::gatherAdditionalInfo(), Analyzer::ColumnVar::get_comp_param(), Geospatial::get_compression_scheme(), anonymous_namespace{TypedDataAccessors.h}::get_element_size(), get_logical_type_info(), Catalog_Namespace::Catalog::getColumnDictDirectory(), Catalog_Namespace::Catalog::getDictionaryToColumnMapping(), ArrowResultSetConverter::initializeColumnBuilder(), inline_fixed_encoding_null_val(), anonymous_namespace{RelAlgExecutor.cpp}::insert_one_dict_str(), Geospatial::is_null_point(), foreign_storage::ParquetDataWrapper::loadBuffersUsingLazyParquetChunkLoader(), Analyzer::GeoConstant::makePhysicalConstant(), Parser::OperExpr::normalize(), operator!=(), TextConverterFactory::operator()(), operator=(), operator==(), anonymous_namespace{Datum.cpp}::parseInteger(), DBHandler::populateThriftColumnType(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), Catalog_Namespace::Catalog::removeTableFromMap(), Catalog_Namespace::Catalog::setColumnDictionary(), Catalog_Namespace::Catalog::setColumnSharedDictionary(), to_string(), Analyzer::UOper::toString(), ThriftSerializers::type_info_to_thrift(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_date_mapping(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_time_mapping(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_timestamp_mapping(), TransientDictIdVisitor::visitCaseExpr(), TransientDictIdVisitor::visitUOper(), and File_Namespace::FileBuffer::writeMetadata().

332 { return comp_param; }
int comp_param
Definition: sqltypes.h:766
HOST DEVICE EncodingType SQLTypeInfo::get_compression ( ) const
inline

Definition at line 331 of file sqltypes.h.

References compression.

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(), bind_function(), CodeGenerator::castArrayPointer(), ChunkIter_get_next(), ChunkIter_get_nth(), import_export::TypedImportBuffer::clear(), spatial_type::NPoints::codegen(), TargetExprCodegen::codegenAggregate(), CodeGenerator::codegenCastFromString(), CodeGenerator::codegenCmp(), CodeGenerator::codegenCompression(), CodeGenerator::codegenGeoFunctionOperator(), CodeGenerator::codegenHoistedConstantsLoads(), CodeGenerator::codgenAdjustFixedEncNull(), Analyzer::BinOper::common_string_type(), import_export::ImporterUtils::composeNullPointCoords(), Geospatial::compress_coord(), Geospatial::compress_coords(), Geospatial::compress_null_point(), Geospatial::convert_coords(), Encoder::Create(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::create_parquet_decimal_encoder(), Catalog_Namespace::Catalog::createTable(), DatumEqual(), decompress(), Analyzer::Expr::decompress(), Catalog_Namespace::Catalog::delDictionary(), Catalog_Namespace::Catalog::doTruncateTable(), encoding_to_thrift(), RelAlgExecutor::executeSimpleInsert(), extract_from_datum(), import_export::fill_missing_columns(), ChunkMetadata::fillChunkStats(), anonymous_namespace{ColumnarResults.cpp}::fixed_encoding_nullable_val(), Catalog_Namespace::Catalog::gatherAdditionalInfo(), get_array_context_logical_size(), Analyzer::ColumnVar::get_compression(), Geospatial::get_compression_scheme(), anonymous_namespace{TypedDataAccessors.h}::get_element_size(), anonymous_namespace{TargetExprBuilder.cpp}::get_initial_agg_val(), anonymous_namespace{TableFunctionCompilationContext.cpp}::get_llvm_type_from_sql_column_type(), get_logical_type_info(), Chunk_NS::Chunk::getChunkBuffer(), Parser::LocalConnector::getColumnDescriptors(), Catalog_Namespace::Catalog::getColumnDictDirectory(), Chunk_NS::Chunk::getNumElemsForBytesInsertData(), import_export::Loader::getStringDict(), ResultSet::getTargetValueFromBufferRowwise(), Chunk_NS::Chunk::initEncoder(), inline_fixed_encoding_null_val(), inline_int_null_val(), CgenState::inlineIntNull(), anonymous_namespace{RelAlgExecutor.cpp}::int_value_from_numbers_ptr(), is_bytes(), is_date_in_days(), FixedLengthArrayNoneEncoder::is_null(), Geospatial::is_null_point(), is_real_str_or_array(), is_unsigned_type(), Fragmenter_Namespace::isStringVectorData(), ResultSet::makeGeoTargetValue(), Analyzer::GeoConstant::makePhysicalConstant(), ResultSet::makeVarlenTargetValue(), anonymous_namespace{ExtensionFunctionsBinding.cpp}::match_arguments(), Parser::OperExpr::normalize(), null_val_bit_pattern(), numeric_type_name(), operator!=(), TextConverterFactory::operator()(), operator=(), operator==(), anonymous_namespace{Datum.cpp}::parseInteger(), Parser::InsertIntoTableAsSelectStmt::populateData(), DBHandler::populateThriftColumnType(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), Catalog_Namespace::Catalog::removeTableFromMap(), anonymous_namespace{TableOptimizer.cpp}::set_metadata_from_results(), Fragmenter_Namespace::sizeOfRawColumn(), RelAlgTranslator::translateBinaryGeoFunction(), RelAlgTranslator::translateGeoFunctionArg(), RelAlgTranslator::translateGeoLiteral(), import_export::TypedImportBuffer::TypedImportBuffer(), ExpressionRange::typeSupportsRange(), FixedLengthArrayNoneEncoder::update_elem_stats(), ArrayNoneEncoder::update_elem_stats(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), anonymous_namespace{InputMetadata.cpp}::uses_int_meta(), foreign_storage::ParquetDateInSecondsEncoder::validate(), ddl_utils::validate_and_set_array_size(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_date_mapping(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_decimal_mapping(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_floating_point_mapping(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_integral_mapping(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_none_type_mapping(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_string_mapping(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_time_mapping(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_timestamp_mapping(), File_Namespace::FileBuffer::writeMetadata(), and import_export::TypedImportBuffer::~TypedImportBuffer().

331 { return compression; }
EncodingType compression
Definition: sqltypes.h:765
std::string SQLTypeInfo::get_compression_name ( ) const
inline

Definition at line 464 of file sqltypes.h.

References comp_name, and compression.

Referenced by to_string(), and Analyzer::UOper::toString().

464 { return comp_name[(int)compression]; }
EncodingType compression
Definition: sqltypes.h:765
static std::string comp_name[kENCODING_LAST]
Definition: sqltypes.h:770

+ Here is the caller graph for this function:

HOST DEVICE int SQLTypeInfo::get_dimension ( ) const
inline

Definition at line 325 of file sqltypes.h.

References dimension.

Referenced by Catalog_Namespace::Catalog::addColumn(), Analyzer::BinOper::analyze_type_info(), Analyzer::Constant::cast_string(), Analyzer::Constant::cast_to_string(), CodeGenerator::codegenCast(), CodeGenerator::codegenCastBetweenTimestamps(), 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(), anonymous_namespace{Execute.cpp}::get_hpt_overflow_underflow_safe_scaled_values(), get_logical_type_info(), anonymous_namespace{ExpressionRange.cpp}::getDateTimePrecisionCastRange(), DateTimeTranslator::getDateTruncConstantValue(), DateTimeTranslator::getExtractFromTimeConstantValue(), is_high_precision_timestamp(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::is_microsecond_precision(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::is_millisecond_precision(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::is_nanosecond_precision(), operator!=(), operator=(), operator==(), parse_numeric(), Parser::InsertIntoTableAsSelectStmt::populateData(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), StringToDatum(), to_string(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_timestamp_mapping(), and File_Namespace::FileBuffer::writeMetadata().

325 { return dimension; }
int dimension
Definition: sqltypes.h:761

+ Here is the caller graph for this function:

SQLTypeInfo SQLTypeInfo::get_elem_type ( ) const
inline

Definition at line 726 of file sqltypes.h.

References comp_param, compression, dimension, kNULLT, notnull, scale, SQLTypeInfo(), and subtype.

Referenced by import_export::TypedImportBuffer::add_value(), import_export::TypedImportBuffer::add_values(), Parser::FunctionRef::analyze(), anonymous_namespace{ResultSetIteration.cpp}::build_array_target_value(), CodeGenerator::codegenArrayBuff(), CodeGenerator::codegenFunctionOperCastArgs(), spatial_type::NPoints::codegenLoads(), spatial_type::NRings::codegenLoads(), ArrayConverterFactory< ELEMENT_FACTORY >::create(), foreign_storage::ParquetEncoder::createMetadata(), DateDaysOverflowValidator::DateDaysOverflowValidator(), DecimalOverflowValidator::DecimalOverflowValidator(), Analyzer::Constant::do_cast(), ChunkMetadata::dump(), RelAlgExecutor::executeSimpleInsert(), get_bit_width(), anonymous_namespace{ExtensionsIR.cpp}::get_llvm_type_from_sql_array_type(), foreign_storage::Csv::get_placeholder_metadata(), foreign_storage::get_sub_type_column_descriptor(), get_type_name(), getLeafColumnRange(), foreign_storage::TypedParquetInPlaceEncoder< int64_t, int32_t >::getRowGroupMetadata(), is_castable(), is_dict_encoded_type(), foreign_storage::ParquetDataWrapper::loadBuffersUsingLazyParquetChunkLoader(), ResultSet::makeVarlenTargetValue(), anonymous_namespace{ExtensionFunctionsBinding.cpp}::match_arguments(), import_export::NullArray(), NullAwareValidator< INNER_VALIDATOR >::NullAwareValidator(), ArraysConverterFactory::operator()(), ChunkMetadata::operator==(), Parser::InsertIntoTableAsSelectStmt::populateData(), ResultSetReductionJIT::reduceOneSlot(), ResultSetStorage::reduceOneSlot(), FixedLengthArrayNoneEncoder::resetChunkStats(), ArrayNoneEncoder::resetChunkStats(), foreign_storage::ParquetFixedLengthArrayEncoder::setNullFixedLengthArraySentinel(), import_export::StringToArray(), import_export::anonymous_namespace{QueryExporterCSV.cpp}::target_value_to_string(), import_export::TDatumToArrayDatum(), to_string(), Analyzer::Constant::toString(), ThriftSerializers::type_info_to_thrift(), ExpressionRange::typeSupportsRange(), ddl_utils::validate_and_set_array_size(), DBHandler::value_to_thrift(), and DBHandler::value_to_thrift_column().

726  {
727  return SQLTypeInfo(
729  }
SQLTypes subtype
Definition: sqltypes.h:760
bool notnull
Definition: sqltypes.h:764
EncodingType compression
Definition: sqltypes.h:765
int comp_param
Definition: sqltypes.h:766
int dimension
Definition: sqltypes.h:761

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

HOST DEVICE int SQLTypeInfo::get_input_srid ( ) const
inline

Definition at line 327 of file sqltypes.h.

References dimension.

Referenced by Geospatial::GeoBase::transform(), transforms(), RelAlgTranslator::translateBinaryGeoFunction(), RelAlgTranslator::translateGeoFunctionArg(), RelAlgTranslator::translateTernaryGeoFunction(), and RelAlgTranslator::translateUnaryGeoFunction().

327 { return dimension; }
int dimension
Definition: sqltypes.h:761

+ Here is the caller graph for this function:

int SQLTypeInfo::get_logical_size ( ) const
inline

Definition at line 334 of file sqltypes.h.

References compression, dimension, get_size(), kENCODING_DATE_IN_DAYS, kENCODING_DICT, kENCODING_FIXED, kENCODING_NONE, notnull, scale, subtype, and type.

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

334  {
337  return ti.get_size();
338  }
339  if (compression == kENCODING_DICT) {
340  return 4;
341  }
342  return get_size();
343  }
HOST DEVICE int get_size() const
Definition: sqltypes.h:333
SQLTypes subtype
Definition: sqltypes.h:760
bool notnull
Definition: sqltypes.h:764
EncodingType compression
Definition: sqltypes.h:765
SQLTypes type
Definition: sqltypes.h:759
int dimension
Definition: sqltypes.h:761

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

HOST DEVICE bool SQLTypeInfo::get_notnull ( ) const
inline

Definition at line 330 of file sqltypes.h.

References notnull.

Referenced by import_export::TypedImportBuffer::add_arrow_values(), import_export::TypedImportBuffer::add_value(), import_export::TypedImportBuffer::add_values(), Catalog_Namespace::Catalog::addColumn(), Parser::InsertValuesStmt::analyze(), Analyzer::BinOper::analyze_type_info(), anonymous_namespace{ResultSetIteration.cpp}::GeoTargetValueBuilder< GEO_SOURCE_TYPE, GeoTargetFetcher >::build(), ChunkIter_get_nth(), ChunkIter_get_nth_point_coords(), GroupByAndAggregate::codegenApproxQuantile(), CodeGenerator::codegenCast(), CodeGenerator::codegenCastBetweenIntTypes(), CodeGenerator::codegenCastBetweenIntTypesOverflowChecks(), CodeGenerator::codegenCastFromFp(), CodeGenerator::codegenCastToFp(), CodeGenerator::codegenDateTruncHighPrecisionTimestamps(), CodeGenerator::codegenDiv(), CodeGenerator::codegenExtractHighPrecisionTimestamps(), CodeGenerator::codegenGeoArrayLoadAndNullcheck(), Analyzer::BinOper::common_numeric_type(), Analyzer::BinOper::common_string_type(), Geospatial::compress_coords(), anonymous_namespace{ArrowResultSetConverter.cpp}::create_or_append_validity(), Catalog_Namespace::Catalog::createTable(), Analyzer::Expr::decompress(), Analyzer::InIntegerSet::deep_copy(), Analyzer::Constant::do_cast(), anonymous_namespace{ResultSetIteration.cpp}::GeoLazyFetchHandler::fetch(), anonymous_namespace{ResultSetIteration.cpp}::GeoQueryOutputFetchHandler::fetch(), get_agg_initial_val(), get_logical_type_info(), get_null_check_suffix(), get_target_info(), Fragmenter_Namespace::get_var_len_null_array_indexes(), spatial_type::NPoints::getOperand(), Analyzer::anonymous_namespace{Analyzer.cpp}::is_expr_nullable(), FixedLengthArrayNoneEncoder::is_null(), foreign_storage::csv_file_buffer_parser::is_null_datum(), Geospatial::is_null_point(), ResultSet::isNull(), ArrowResultSetConverter::makeField(), NullAwareValidator< INNER_VALIDATOR >::NullAwareValidator(), operator!=(), operator=(), operator==(), anonymous_namespace{Datum.cpp}::parseInteger(), DBHandler::populateThriftColumnType(), anonymous_namespace{TypedDataAccessors.h}::put_null(), anonymous_namespace{TypedDataAccessors.h}::put_null_array(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), Executor::reduceResults(), GeoTargetValueSerializer< kPOINT >::serialize(), GeoWktSerializer< kPOINT >::serialize(), GeoTargetValuePtrSerializer< kPOINT >::serialize(), GeoTargetValueSerializer< kLINESTRING >::serialize(), GeoWktSerializer< kLINESTRING >::serialize(), GeoTargetValuePtrSerializer< kLINESTRING >::serialize(), GeoTargetValueSerializer< kPOLYGON >::serialize(), GeoWktSerializer< kPOLYGON >::serialize(), GeoTargetValuePtrSerializer< kPOLYGON >::serialize(), GeoTargetValueSerializer< kMULTIPOLYGON >::serialize(), GeoWktSerializer< kMULTIPOLYGON >::serialize(), GeoTargetValuePtrSerializer< kMULTIPOLYGON >::serialize(), Fragmenter_Namespace::set_chunk_stats(), anonymous_namespace{ResultSetReductionJIT.cpp}::target_info_key(), to_string(), ThriftSerializers::type_info_to_thrift(), Fragmenter_Namespace::anonymous_namespace{UpdelStorage.cpp}::update_metadata(), ddl_utils::validate_and_set_sparse_encoding(), foreign_storage::ParquetEncoder::validateNullCount(), DBHandler::value_to_thrift_column(), DeepCopyVisitor::visitInIntegerSet(), and File_Namespace::FileBuffer::writeMetadata().

330 { return notnull; }
bool notnull
Definition: sqltypes.h:764
int SQLTypeInfo::get_physical_cols ( ) const
inline

Definition at line 344 of file sqltypes.h.

References kLINESTRING, kMULTIPOLYGON, kPOINT, kPOLYGON, and type.

Referenced by Catalog_Namespace::Catalog::buildMaps(), Parser::DropColumnStmt::execute(), import_export::fill_missing_columns(), foreign_storage::ParquetDataWrapper::loadBuffersUsingLazyParquetChunkLoader(), and Catalog_Namespace::Catalog::renameColumn().

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

+ Here is the caller graph for this function:

int SQLTypeInfo::get_physical_coord_cols ( ) const
inline

Definition at line 359 of file sqltypes.h.

References kLINESTRING, kMULTIPOLYGON, kPOINT, kPOLYGON, and type.

Referenced by advance_target_ptr_col_wise(), advance_target_ptr_row_wise(), TargetExprCodegen::codegen(), CodeGenerator::codegenFunctionOperNullArg(), CodeGenerator::codegenGeoBinOper(), CodeGenerator::codegenGeoUOper(), get_slots_for_geo_target(), Analyzer::GeoConstant::makePhysicalConstant(), Analyzer::GeoConstant::physicalCols(), and RelAlgTranslator::translateGeoColumn().

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

+ Here is the caller graph for this function:

HOST DEVICE int SQLTypeInfo::get_scale ( ) const
inline

Definition at line 328 of file sqltypes.h.

References scale.

Referenced by Catalog_Namespace::Catalog::addColumn(), Analyzer::BinOper::analyze_type_info(), Analyzer::Constant::cast_number(), Executor::castToFP(), 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(), DecimalOverflowValidator::DecimalOverflowValidator(), Analyzer::Expr::decompress(), anonymous_namespace{ArrowResultSetConverter.cpp}::get_arrow_type(), anonymous_namespace{TypedDataAccessors.h}::get_element_size(), get_logical_type_info(), getArrowImportType(), anonymous_namespace{RelAlgTranslator.cpp}::makeNumericConstant(), operator!=(), operator=(), operator==(), pair_to_double(), parse_numeric(), Parser::InsertIntoTableAsSelectStmt::populateData(), DBHandler::populateThriftColumnType(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), anonymous_namespace{ExpressionRange.cpp}::scale_up_interval_endpoint(), to_string(), Analyzer::UOper::toString(), ThriftSerializers::type_info_to_thrift(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_decimal_mapping(), DBHandler::value_to_thrift(), DBHandler::value_to_thrift_column(), and File_Namespace::FileBuffer::writeMetadata().

328 { return scale; }

+ Here is the caller graph for this function:

HOST DEVICE int SQLTypeInfo::get_size ( ) const
inline

Definition at line 333 of file sqltypes.h.

References size.

Referenced by import_export::TypedImportBuffer::add_value(), Catalog_Namespace::Catalog::addColumn(), import_export::TypedImportBuffer::addDictEncodedString(), ArrayValueConverter< ELEMENT_CONVERTER >::ArrayValueConverter(), Chunk_NS::Chunk::begin_iterator(), anonymous_namespace{CastIR.cpp}::byte_array_cast(), CodeGenerator::castArrayPointer(), Executor::castToFP(), anonymous_namespace{QueryRewrite.cpp}::check_string_id_overflow(), import_export::TypedImportBuffer::clear(), CodeGenerator::codegenAdd(), CodeGenerator::codegenCast(), CodeGenerator::codegenMul(), CodeGenerator::codegenSub(), CodeGenerator::codgenAdjustFixedEncNull(), GroupByAndAggregate::convertNullIfAny(), NumericConverterFactory< SOURCE_TYPE, TARGET_TYPE >::create(), ResultSetLogicalValuesBuilder::create(), DictionaryConverterFactory< TARGET_TYPE >::create(), Encoder::Create(), ArrowForeignStorageBase::createDecimalColumn(), Catalog_Namespace::Catalog::createTable(), decimal_to_int_type(), Parser::InsertValuesStmt::determineLeafIndex(), RelAlgExecutor::executeSimpleInsert(), Fragmenter_Namespace::FixedLenArrayChunkConverter::FixedLenArrayChunkConverter(), ArrowForeignStorageBase::generateNullValues(), ArrowForeignStorageBase::generateSentinelValues(), get_bit_width(), anonymous_namespace{ArrowResultSetConverter.cpp}::get_dict_index_type(), anonymous_namespace{TypedDataAccessors.h}::get_element_size(), anonymous_namespace{TableFunctionCompilationContext.cpp}::get_llvm_type_from_sql_column_type(), get_logical_size(), anonymous_namespace{ArrowResultSetConverter.cpp}::get_physical_type(), foreign_storage::Csv::get_placeholder_metadata(), anonymous_namespace{TypedDataAccessors.h}::get_scalar(), getArrowImportType(), Parser::LocalConnector::getColumnDescriptors(), foreign_storage::TimestampBoundsValidator< T >::getMinMaxBoundsAsStrings(), foreign_storage::IntegralFixedLengthBoundsValidator< T >::getMinMaxBoundsAsStrings(), foreign_storage::DateInSecondsBoundsValidator< T >::getMinMaxBoundsAsStrings(), foreign_storage::FloatPointValidator< T >::getMinMaxBoundsAsStrings(), Chunk_NS::Chunk::getNumElemsForBytesInsertData(), StorageIOFacility::getRsBufferNoPadding(), import_export::TypedImportBuffer::getStringDictBuffer(), inline_fixed_encoding_null_val(), anonymous_namespace{RelAlgExecutor.cpp}::int_value_from_numbers_ptr(), is_unsigned_type(), ColumnFetcher::makeJoinColumn(), import_export::NullArray(), TextConverterFactory::operator()(), operator=(), foreign_storage::ParquetFixedLengthArrayEncoder::ParquetFixedLengthArrayEncoder(), Parser::InsertIntoTableAsSelectStmt::populateData(), DBHandler::populateThriftColumnType(), anonymous_namespace{TypedDataAccessors.h}::put_null(), anonymous_namespace{TypedDataAccessors.h}::put_null_array(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::resize_values_buffer(), Fragmenter_Namespace::sizeOfRawColumn(), import_export::StringToArray(), import_export::TDatumToArrayDatum(), to_string(), ThriftSerializers::type_info_to_thrift(), import_export::TypedImportBuffer::TypedImportBuffer(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumns(), ddl_utils::validate_and_set_array_size(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_integral_mapping(), foreign_storage::TimestampBoundsValidator< T >::valueWithinBounds(), foreign_storage::IntegralFixedLengthBoundsValidator< T >::valueWithinBounds(), foreign_storage::DateInSecondsBoundsValidator< T >::valueWithinBounds(), foreign_storage::FloatPointValidator< T >::valueWithinBounds(), File_Namespace::FileBuffer::writeMetadata(), and import_export::TypedImportBuffer::~TypedImportBuffer().

333 { return size; }
HOST DEVICE int SQLTypeInfo::get_storage_size ( ) const
inlineprivate

Definition at line 772 of file sqltypes.h.

References comp_param, compression, dimension, kARRAY, kBIGINT, kBOOLEAN, kCHAR, kCOLUMN, kCOLUMN_LIST, kDATE, kDECIMAL, kDOUBLE, kENCODING_DATE_IN_DAYS, kENCODING_DICT, kENCODING_DIFF, kENCODING_FIXED, kENCODING_GEOINT, kENCODING_NONE, kENCODING_RL, kENCODING_SPARSE, kFLOAT, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kLINESTRING, kMULTIPOLYGON, kNUMERIC, kPOINT, kPOLYGON, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, and type.

Referenced by set_fixed_size().

772  {
773  switch (type) {
774  case kBOOLEAN:
775  return sizeof(int8_t);
776  case kTINYINT:
777  return sizeof(int8_t);
778  case kSMALLINT:
779  switch (compression) {
780  case kENCODING_NONE:
781  return sizeof(int16_t);
782  case kENCODING_FIXED:
783  case kENCODING_SPARSE:
784  return comp_param / 8;
785  case kENCODING_RL:
786  case kENCODING_DIFF:
787  break;
788  default:
789  assert(false);
790  }
791  break;
792  case kINT:
793  switch (compression) {
794  case kENCODING_NONE:
795  return sizeof(int32_t);
796  case kENCODING_FIXED:
797  case kENCODING_SPARSE:
798  case kENCODING_GEOINT:
799  return comp_param / 8;
800  case kENCODING_RL:
801  case kENCODING_DIFF:
802  break;
803  default:
804  assert(false);
805  }
806  break;
807  case kBIGINT:
808  case kNUMERIC:
809  case kDECIMAL:
810  switch (compression) {
811  case kENCODING_NONE:
812  return sizeof(int64_t);
813  case kENCODING_FIXED:
814  case kENCODING_SPARSE:
815  return comp_param / 8;
816  case kENCODING_RL:
817  case kENCODING_DIFF:
818  break;
819  default:
820  assert(false);
821  }
822  break;
823  case kFLOAT:
824  switch (compression) {
825  case kENCODING_NONE:
826  return sizeof(float);
827  case kENCODING_FIXED:
828  case kENCODING_RL:
829  case kENCODING_DIFF:
830  case kENCODING_SPARSE:
831  assert(false);
832  break;
833  default:
834  assert(false);
835  }
836  break;
837  case kDOUBLE:
838  switch (compression) {
839  case kENCODING_NONE:
840  return sizeof(double);
841  case kENCODING_FIXED:
842  case kENCODING_RL:
843  case kENCODING_DIFF:
844  case kENCODING_SPARSE:
845  assert(false);
846  break;
847  default:
848  assert(false);
849  }
850  break;
851  case kTIMESTAMP:
852  case kTIME:
853  case kINTERVAL_DAY_TIME:
855  case kDATE:
856  switch (compression) {
857  case kENCODING_NONE:
858  return sizeof(int64_t);
859  case kENCODING_FIXED:
860  if (type == kTIMESTAMP && dimension > 0) {
861  assert(false); // disable compression for timestamp precisions
862  }
863  return comp_param / 8;
864  case kENCODING_RL:
865  case kENCODING_DIFF:
866  case kENCODING_SPARSE:
867  assert(false);
868  break;
870  switch (comp_param) {
871  case 0:
872  return 4; // Default date encoded in days is 32 bits
873  case 16:
874  case 32:
875  return comp_param / 8;
876  default:
877  assert(false);
878  break;
879  }
880  default:
881  assert(false);
882  }
883  break;
884  case kTEXT:
885  case kVARCHAR:
886  case kCHAR:
887  if (compression == kENCODING_DICT) {
888  return sizeof(int32_t); // @TODO(wei) must check DictDescriptor
889  }
890  break;
891  case kARRAY:
892  // TODO: return size for fixlen arrays?
893  break;
894  case kPOINT:
895  case kLINESTRING:
896  case kPOLYGON:
897  case kMULTIPOLYGON:
898  case kCOLUMN:
899  case kCOLUMN_LIST:
900  break;
901  default:
902  break;
903  }
904  return -1;
905  }
Definition: sqltypes.h:48
EncodingType compression
Definition: sqltypes.h:765
Definition: sqltypes.h:51
Definition: sqltypes.h:52
Definition: sqltypes.h:40
SQLTypes type
Definition: sqltypes.h:759
Definition: sqltypes.h:44
int comp_param
Definition: sqltypes.h:766
int dimension
Definition: sqltypes.h:761

+ Here is the caller graph for this function:

HOST DEVICE SQLTypes SQLTypeInfo::get_subtype ( ) const
inline

Definition at line 324 of file sqltypes.h.

References subtype.

Referenced by import_export::TypedImportBuffer::add_value(), import_export::TypedImportBuffer::add_values(), Catalog_Namespace::Catalog::addColumn(), Parser::InsertValuesStmt::analyze(), anonymous_namespace{CastIR.cpp}::byte_array_cast(), import_export::TypedImportBuffer::clear(), CodeGenerator::codegenHoistedConstantsLoads(), CodeGenerator::codgenAdjustFixedEncNull(), Encoder::Create(), Catalog_Namespace::Catalog::createTable(), Analyzer::Expr::decompress(), import_export::fill_missing_columns(), anonymous_namespace{TypedDataAccessors.h}::get_element_size(), get_logical_type_info(), import_export::Loader::getStringDict(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_array_column(), FixedLengthArrayNoneEncoder::is_null(), operator!=(), operator=(), operator==(), import_export::TypedImportBuffer::pop_value(), Parser::InsertIntoTableAsSelectStmt::populateData(), DBHandler::populateThriftColumnType(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::sql_type_info_to_ogr_field_type(), RelAlgTranslator::translateArrayFunction(), RelAlgTranslator::translateBinaryGeoFunction(), RelAlgTranslator::translateGeoFunctionArg(), RelAlgTranslator::translateTernaryGeoFunction(), RelAlgTranslator::translateUnaryGeoFunction(), ThriftSerializers::type_info_to_thrift(), type_to_thrift(), import_export::TypedImportBuffer::TypedImportBuffer(), FixedLengthArrayNoneEncoder::update_elem_stats(), ArrayNoneEncoder::update_elem_stats(), ddl_utils::validate_and_set_date_encoding(), ddl_utils::validate_and_set_fixed_encoding(), File_Namespace::FileBuffer::writeMetadata(), and import_export::TypedImportBuffer::~TypedImportBuffer().

324 { return subtype; }
SQLTypes subtype
Definition: sqltypes.h:760

+ Here is the caller graph for this function:

HOST DEVICE SQLTypes SQLTypeInfo::get_type ( ) const
inline

Definition at line 323 of file sqltypes.h.

References type.

Referenced by import_export::TypedImportBuffer::add_arrow_values(), import_export::TypedImportBuffer::add_value(), import_export::TypedImportBuffer::add_values(), Catalog_Namespace::Catalog::addColumn(), Parser::ArrayLiteral::analyze(), Parser::FunctionRef::analyze(), Parser::InsertValuesStmt::analyze(), Analyzer::BinOper::analyze_type_info(), appendDatum(), bind_function(), Analyzer::Constant::cast_number(), Analyzer::Constant::cast_string(), Analyzer::Constant::cast_to_string(), CodeGenerator::castArrayPointer(), anonymous_namespace{IRCodegen.cpp}::check_valid_join_qual(), import_export::TypedImportBuffer::clear(), TargetExprCodegen::codegenAggregate(), CodeGenerator::codegenCast(), CodeGenerator::codegenCastFromFp(), CodeGenerator::codegenCastToFp(), CodeGenerator::codegenCmp(), CodeGenerator::codegenDiv(), CodeGenerator::codegenFunctionOper(), CodeGenerator::codegenGeoArrayLoadAndNullcheck(), CodeGenerator::codegenGeoBinOper(), CodeGenerator::codegenGeoUOper(), CodeGenerator::codegenHoistedConstantsLoads(), CodeGenerator::codegenIsNullNumber(), Analyzer::BinOper::common_numeric_type(), Analyzer::BinOper::common_string_type(), Geospatial::compress_coords(), import_export::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(), RelAlgExecutor::executeSimpleInsert(), 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(), anonymous_namespace{ResultSetIteration.cpp}::GeoLazyFetchHandler::fetch(), anonymous_namespace{ResultSetIteration.cpp}::GeoQueryOutputFetchHandler::fetch(), import_export::fill_missing_columns(), ChunkMetadata::fillChunkStats(), anonymous_namespace{WindowContext.cpp}::fp_comparator(), anonymous_namespace{ExpressionRange.cpp}::fpRangeFromDecimal(), ArrowForeignStorageBase::generateNullValues(), ArrowForeignStorageBase::generateSentinelValues(), Analyzer::GeoConstant::GeoConstant(), foreign_storage::GeospatialEncoder::GeospatialEncoder(), get_bit_width(), anonymous_namespace{PerfectJoinHashTable.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(), getArrowImportType(), import_export::TypedImportBuffer::getAsBytes(), Chunk_NS::Chunk::getChunkBuffer(), EmbeddedDatabase::CursorImpl::getColType(), import_export::TypedImportBuffer::getElementSize(), getExpressionRange(), Geospatial::GeoTypesFactory::getGeoColumns(), PerfectJoinHashTable::getHashJoinArgs(), Geospatial::GeoTypesFactory::getNullGeoColumns(), Chunk_NS::Chunk::getNumElemsForBytesInsertData(), StorageIOFacility::getRsBufferNoPadding(), import_export::Loader::getStringDict(), Analyzer::ColumnVar::group_predicates(), import_export::Importer::importDelimited(), import_export::Importer::importGDAL(), Chunk_NS::Chunk::initEncoder(), inline_fp_null_val(), inline_int_null_val(), anonymous_namespace{Execute.cpp}::inline_null_val(), CgenState::inlineFpNull(), CgenState::inlineIntNull(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_geo_column(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_scalar_column(), anonymous_namespace{RelAlgExecutor.cpp}::int_value_from_numbers_ptr(), is_castable(), Geospatial::is_null_point(), Analyzer::anonymous_namespace{Analyzer.cpp}::is_null_value(), anonymous_namespace{TargetExprBuilder.cpp}::is_varlen_projection(), anonymous_namespace{ScalarCodeGenerator.cpp}::llvm_type_from_sql(), make_fp_constant(), ResultSet::makeGeoTargetValue(), anonymous_namespace{RelAlgTranslator.cpp}::makeNumericConstant(), 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(), import_export::NullArrayDatum(), import_export::NullDatum(), numeric_type_name(), operator!=(), operator=(), operator==(), pair_to_double(), import_export::TypedImportBuffer::pop_value(), populate_TColumn(), Parser::InsertIntoTableAsSelectStmt::populateData(), DBHandler::populateThriftColumnType(), foreign_storage::GeospatialEncoder::processGeoElement(), foreign_storage::GeospatialEncoder::processNullGeoElement(), anonymous_namespace{TypedDataAccessors.h}::put_null(), anonymous_namespace{TypedDataAccessors.h}::put_null_array(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), ArrowForeignStorageBase::read(), ddl_utils::set_default_encoding(), import_export::Importer::set_geo_physical_import_buffer(), import_export::Importer::set_geo_physical_import_buffer_columnar(), anonymous_namespace{TableOptimizer.cpp}::set_metadata_from_results(), Analyzer::Constant::set_null_value(), Fragmenter_Namespace::sizeOfRawColumn(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::sql_type_info_to_ogr_field_type(), StringToDatum(), takes_float_argument(), import_export::TDatumToDatum(), Analyzer::Constant::toString(), RelAlgTranslator::translateBinaryGeoFunction(), RelAlgTranslator::translateGeoColumn(), RelAlgTranslator::translateGeoFunctionArg(), RelAlgTranslator::translateGeoLiteral(), RelAlgTranslator::translateGeoOverlapsOper(), RelAlgTranslator::translateTernaryGeoFunction(), RelAlgTranslator::translateUnaryGeoFunction(), ArrowForeignStorageBase::tryZeroCopy(), ThriftSerializers::type_info_to_thrift(), type_to_thrift(), import_export::TypedImportBuffer::TypedImportBuffer(), ddl_utils::validate_and_set_date_encoding(), ddl_utils::validate_and_set_fixed_encoding(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_date_mapping(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_floating_point_mapping(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_none_type_mapping(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_time_mapping(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_timestamp_mapping(), foreign_storage::GeospatialEncoder::validateChunksAndMetadataSizing(), DBHandler::value_to_thrift(), DBHandler::value_to_thrift_column(), anonymous_namespace{WindowExpressionRewrite.cpp}::window_sum_and_count_match(), File_Namespace::FileBuffer::writeMetadata(), and import_export::TypedImportBuffer::~TypedImportBuffer().

323 { return type; }
SQLTypes type
Definition: sqltypes.h:759
std::string SQLTypeInfo::get_type_name ( ) const
inline

Definition at line 426 of file sqltypes.h.

References CHECK_LT, dimension, get_elem_type(), get_output_srid(), IS_GEO, kARRAY, kCOLUMN, kCOLUMN_LIST, kDECIMAL, kNUMERIC, kSQLTYPE_LAST, kTIMESTAMP, scale, size, subtype, to_string(), type, and type_name.

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{ExternalExecutor.cpp}::create_table_schema(), anonymous_namespace{ArrowImporter.h}::data_conversion_error(), Analyzer::Datum_equal(), DatumToString(), Analyzer::Constant::do_cast(), ChunkMetadata::dump(), Analyzer::GeoConstant::GeoConstant(), get_agg_type(), anonymous_namespace{ArrowResultSetConverter.cpp}::get_arrow_type(), getArrowImportType(), Data_Namespace::AbstractBuffer::initEncoder(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_array_column(), ResultSet::makeGeoTargetValue(), anonymous_namespace{ExtensionFunctionsBinding.cpp}::match_arguments(), pair_to_double(), anonymous_namespace{Datum.cpp}::parseFloatAsInteger(), anonymous_namespace{Datum.cpp}::parseInteger(), Parser::InsertIntoTableAsSelectStmt::populateData(), Fragmenter_Namespace::sizeOfRawColumn(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::sql_type_info_to_ogr_field_type(), StringToDatum(), anonymous_namespace{ResultSetReductionJIT.cpp}::target_info_key(), RexAgg::toHash(), anonymous_namespace{Datum.cpp}::toString(), Analyzer::ColumnVar::toString(), Analyzer::UOper::toString(), RexAgg::toString(), anonymous_namespace{ArrowImporter.h}::type_conversion_error(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_allowed_mapping(), and ScalarExprToSql::visitUOper().

426  {
427  if (IS_GEO(type)) {
428  std::string srid_string = "";
429  if (get_output_srid() > 0) {
430  srid_string = ", " + std::to_string(get_output_srid());
431  }
432  CHECK_LT(static_cast<int>(subtype), kSQLTYPE_LAST);
433  return type_name[static_cast<int>(subtype)] + "(" +
434  type_name[static_cast<int>(type)] + srid_string + ")";
435  }
436  std::string ps = "";
437  if (type == kDECIMAL || type == kNUMERIC) {
438  ps = "(" + std::to_string(dimension) + "," + std::to_string(scale) + ")";
439  } else if (type == kTIMESTAMP) {
440  ps = "(" + std::to_string(dimension) + ")";
441  }
442  if (type == kARRAY) {
443  auto elem_ti = get_elem_type();
444  auto num_elems = (size > 0) ? std::to_string(size / elem_ti.get_size()) : "";
445  CHECK_LT(static_cast<int>(subtype), kSQLTYPE_LAST);
446  return elem_ti.get_type_name() + ps + "[" + num_elems + "]";
447  }
448  if (type == kCOLUMN) {
449  auto elem_ti = get_elem_type();
450  auto num_elems =
451  (size > 0) ? "[" + std::to_string(size / elem_ti.get_size()) + "]" : "";
452  CHECK_LT(static_cast<int>(subtype), kSQLTYPE_LAST);
453  return "COLUMN<" + type_name[static_cast<int>(subtype)] + ps + ">" + num_elems;
454  }
455  if (type == kCOLUMN_LIST) {
456  auto elem_ti = get_elem_type();
457  auto num_elems =
458  (size > 0) ? "[" + std::to_string(size / elem_ti.get_size()) + "]" : "";
459  CHECK_LT(static_cast<int>(subtype), kSQLTYPE_LAST);
460  return "COLUMN_LIST<" + type_name[static_cast<int>(subtype)] + ps + ">" + num_elems;
461  }
462  return type_name[static_cast<int>(type)] + ps;
463  }
std::string to_string(char const *&&v)
static std::string type_name[kSQLTYPE_LAST]
Definition: sqltypes.h:769
SQLTypes subtype
Definition: sqltypes.h:760
#define CHECK_LT(x, y)
Definition: Logger.h:216
SQLTypes type
Definition: sqltypes.h:759
SQLTypeInfo get_elem_type() const
Definition: sqltypes.h:726
#define IS_GEO(T)
Definition: sqltypes.h:245
int dimension
Definition: sqltypes.h:761
HOST DEVICE int get_output_srid() const
Definition: sqltypes.h:329

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool SQLTypeInfo::has_bounds ( ) const
inline

Definition at line 392 of file sqltypes.h.

References kLINESTRING, kMULTIPOLYGON, kPOLYGON, and type.

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

392  {
393  switch (type) {
394  case kLINESTRING:
395  case kPOLYGON:
396  case kMULTIPOLYGON:
397  return true;
398  default:
399  break;
400  }
401  return false;
402  }
SQLTypes type
Definition: sqltypes.h:759

+ Here is the caller graph for this function:

bool SQLTypeInfo::has_render_group ( ) const
inline

Definition at line 403 of file sqltypes.h.

References kMULTIPOLYGON, kPOLYGON, and type.

Referenced by RelAlgTranslator::translateGeoColumn().

403  {
404  switch (type) {
405  case kPOLYGON:
406  case kMULTIPOLYGON:
407  return true;
408  default:
409  break;
410  }
411  return false;
412  }
SQLTypes type
Definition: sqltypes.h:759

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_array ( ) const
inline

Definition at line 506 of file sqltypes.h.

References kARRAY, and type.

Referenced by anonymous_namespace{ResultSetIteration.cpp}::build_array_target_value(), anonymous_namespace{CastIR.cpp}::byte_array_cast(), CodeGenerator::codegenHoistedConstantsLoads(), CodeGenerator::codegenHoistedConstantsPlaceholders(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::create_parquet_array_encoder(), foreign_storage::ParquetEncoder::createMetadata(), Catalog_Namespace::Catalog::createTable(), DateDaysOverflowValidator::DateDaysOverflowValidator(), DecimalOverflowValidator::DecimalOverflowValidator(), Analyzer::Constant::do_cast(), ChunkMetadata::dump(), get_buffer_name(), anonymous_namespace{TypedDataAccessors.h}::get_element_size(), foreign_storage::Csv::get_placeholder_metadata(), Parser::LocalConnector::getColumnDescriptors(), getLeafColumnRange(), foreign_storage::TypedParquetInPlaceEncoder< int64_t, int32_t >::getRowGroupMetadata(), ResultSet::getTargetValueFromBufferRowwise(), foreign_storage::TypedParquetInPlaceEncoder< int64_t, int32_t >::getUpdatedStats(), CodeGenerator::hashJoinLhs(), is_buffer(), is_dict_encoded_type(), is_real_str_or_array(), Fragmenter_Namespace::isDatumVectorData(), foreign_storage::ParquetDataWrapper::loadBuffersUsingLazyParquetChunkLoader(), ResultSet::makeVarlenTargetValue(), anonymous_namespace{ExtensionFunctionsBinding.cpp}::match_arguments(), Executor::needLinearizeAllFragments(), null_val_bit_pattern(), NullAwareValidator< INNER_VALIDATOR >::NullAwareValidator(), ChunkMetadata::operator==(), Analyzer::Constant::operator==(), Parser::InsertIntoTableAsSelectStmt::populateData(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), Catalog_Namespace::Catalog::setColumnDictionary(), anonymous_namespace{LogicalIR.cpp}::should_defer_eval(), import_export::anonymous_namespace{QueryExporterCSV.cpp}::target_value_to_string(), Analyzer::Constant::toString(), ThriftSerializers::type_info_to_thrift(), ExpressionRange::typeSupportsRange(), foreign_storage::update_stats(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_array_mapping(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_max_repetition_and_definition_level(), DBHandler::value_to_thrift(), and DBHandler::value_to_thrift_column().

506 { return type == kARRAY; } // rbc Array
SQLTypes type
Definition: sqltypes.h:759

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_buffer ( ) const
inline

Definition at line 516 of file sqltypes.h.

References is_array(), is_bytes(), is_column(), and is_column_list().

Referenced by anonymous_namespace{ExtensionsIR.cpp}::get_llvm_type_from_sql_array_type().

516  {
517  return is_array() || is_column() || is_column_list() || is_bytes();
518  }
bool is_column() const
Definition: sqltypes.h:511
bool is_bytes() const
Definition: sqltypes.h:513
bool is_column_list() const
Definition: sqltypes.h:512
bool is_array() const
Definition: sqltypes.h:506

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_bytes ( ) const
inline

Definition at line 513 of file sqltypes.h.

References get_compression(), kENCODING_NONE, kTEXT, and type.

Referenced by get_buffer_name(), anonymous_namespace{ExtensionsIR.cpp}::get_llvm_type_from_sql_array_type(), and is_buffer().

513  {
514  return type == kTEXT && get_compression() == kENCODING_NONE;
515  } // rbc Bytes
Definition: sqltypes.h:51
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:331
SQLTypes type
Definition: sqltypes.h:759

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_castable ( const SQLTypeInfo new_type_info) const
inline

Definition at line 587 of file sqltypes.h.

References get_elem_type(), get_type(), is_castable(), is_number(), is_string(), kARRAY, kBOOLEAN, kCOLUMN, kCOLUMN_LIST, kDATE, kTIMESTAMP, and type.

Referenced by Analyzer::Expr::add_cast(), and is_castable().

587  {
588  // can always cast between the same type but different precision/scale/encodings
589  if (type == new_type_info.get_type()) {
590  return true;
591  // can always cast from or to string
592  } else if (is_string() || new_type_info.is_string()) {
593  return true;
594  // can cast between numbers
595  } else if (is_number() && new_type_info.is_number()) {
596  return true;
597  // can cast from timestamp or date to number (epoch)
598  } else if ((type == kTIMESTAMP || type == kDATE) && new_type_info.is_number()) {
599  return true;
600  // can cast from date to timestamp
601  } else if (type == kDATE && new_type_info.get_type() == kTIMESTAMP) {
602  return true;
603  } else if (type == kTIMESTAMP && new_type_info.get_type() == kDATE) {
604  return true;
605  } else if (type == kBOOLEAN && new_type_info.is_number()) {
606  return true;
607  } else if (type == kARRAY && new_type_info.get_type() == kARRAY) {
608  return get_elem_type().is_castable(new_type_info.get_elem_type());
609  } else if (type == kCOLUMN && new_type_info.get_type() == kCOLUMN) {
610  return get_elem_type().is_castable(new_type_info.get_elem_type());
611  } else if (type == kCOLUMN_LIST && new_type_info.get_type() == kCOLUMN_LIST) {
612  return get_elem_type().is_castable(new_type_info.get_elem_type());
613  } else {
614  return false;
615  }
616  }
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:323
bool is_number() const
Definition: sqltypes.h:503
bool is_castable(const SQLTypeInfo &new_type_info) const
Definition: sqltypes.h:587
Definition: sqltypes.h:52
SQLTypes type
Definition: sqltypes.h:759
bool is_string() const
Definition: sqltypes.h:498
SQLTypeInfo get_elem_type() const
Definition: sqltypes.h:726

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_column ( ) const
inline

Definition at line 511 of file sqltypes.h.

References kCOLUMN, and type.

Referenced by get_buffer_name(), is_buffer(), and DBHandler::value_to_thrift_column().

511 { return type == kCOLUMN; } // rbc Column
SQLTypes type
Definition: sqltypes.h:759

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_column_list ( ) const
inline

Definition at line 512 of file sqltypes.h.

References kCOLUMN_LIST, and type.

Referenced by is_buffer().

512 { return type == kCOLUMN_LIST; } // rbc ColumnList
SQLTypes type
Definition: sqltypes.h:759

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_date_in_days ( ) const
inline

Definition at line 734 of file sqltypes.h.

References get_compression(), kDATE, kENCODING_DATE_IN_DAYS, and type.

Referenced by DateDaysEncoder< T, V >::appendData(), DateDaysOverflowValidator::DateDaysOverflowValidator(), get_join_column_type_kind(), Parser::LocalConnector::getColumnDescriptors(), ResultSet::makeTargetValue(), and DBHandler::populateThriftColumnType().

734  {
735  if (type == kDATE) {
736  const auto comp_type = get_compression();
737  if (comp_type == kENCODING_DATE_IN_DAYS) {
738  return true;
739  }
740  }
741  return false;
742  }
Definition: sqltypes.h:52
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:331
SQLTypes type
Definition: sqltypes.h:759

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_decimal ( ) const
inline

Definition at line 501 of file sqltypes.h.

References kDECIMAL, kNUMERIC, and type.

Referenced by Analyzer::Constant::add_cast(), import_export::TypedImportBuffer::add_value(), Analyzer::BinOper::analyze_type_info(), anonymous_namespace{RelAlgTranslator.cpp}::build_type_info(), CodeGenerator::checkExpressionRanges(), CodeGenerator::codegenAdd(), CodeGenerator::codegenCast(), CodeGenerator::codegenCastBetweenIntTypes(), CodeGenerator::codegenCastFromFp(), CodeGenerator::codegenCmp(), CodeGenerator::codegenDiv(), CodeGenerator::codegenFunctionOperWithCustomTypeHandling(), CodeGenerator::codegenHoistedConstantsLoads(), CodeGenerator::codegenMul(), CodeGenerator::codegenSub(), anonymous_namespace{ArrowResultSetConverter.cpp}::create_or_append_validity(), DecimalOverflowValidator::DecimalOverflowValidator(), extract_from_datum(), get_bit_width(), inline_fixed_encoding_null_val(), import_export::NullArrayDatum(), import_export::NullDatum(), numeric_type_name(), pair_to_double(), import_export::TypedImportBuffer::pop_value(), Parser::InsertIntoTableAsSelectStmt::populateData(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), Executor::reduceResults(), ddl_utils::set_default_encoding(), import_export::anonymous_namespace{QueryExporterCSV.cpp}::target_value_to_string(), import_export::TDatumToDatum(), RelAlgTranslator::translateFunction(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumnMetadata(), anonymous_namespace{InputMetadata.cpp}::uses_int_meta(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_decimal_mapping(), DBHandler::value_to_thrift(), DBHandler::value_to_thrift_column(), and anonymous_namespace{ExpressionRewrite.cpp}::ConstantFoldingVisitor::visitBinOper().

501 { return type == kDECIMAL || type == kNUMERIC; }
SQLTypes type
Definition: sqltypes.h:759

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_dict_encoded_string ( ) const
inline
bool SQLTypeInfo::is_dict_encoded_type ( ) const
inline

Definition at line 543 of file sqltypes.h.

References get_elem_type(), is_array(), and is_dict_encoded_string().

Referenced by foreign_storage::is_metadata_placeholder(), Executor::needLinearizeAllFragments(), and foreign_storage::anonymous_namespace{CsvDataWrapper.cpp}::skip_metadata_scan().

543  {
544  return is_dict_encoded_string() ||
546  }
bool is_dict_encoded_string() const
Definition: sqltypes.h:535
SQLTypeInfo get_elem_type() const
Definition: sqltypes.h:726
bool is_array() const
Definition: sqltypes.h:506

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_fixlen_array ( ) const
inline

Definition at line 508 of file sqltypes.h.

References kARRAY, size, and type.

Referenced by foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::create_parquet_array_encoder(), Chunk_NS::Chunk::createChunkBuffer(), Chunk_NS::Chunk::getChunkBuffer(), Chunk_NS::Chunk::initEncoder(), is_varlen_indeed(), and Chunk_NS::Chunk::isChunkOnDevice().

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

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_fp ( ) const
inline

Definition at line 502 of file sqltypes.h.

References kDOUBLE, kFLOAT, and type.

Referenced by Analyzer::Constant::add_cast(), Executor::castToFP(), CodeGenerator::codegenCastFromFp(), CodeGenerator::codegenCastToFp(), CodeGenerator::codegenDiv(), CodeGenerator::codegenFixedLengthColVarInWindow(), CodeGenerator::codegenIsNullNumber(), GroupByAndAggregate::convertNullIfAny(), anonymous_namespace{ArrowResultSetConverter.cpp}::create_or_append_validity(), anonymous_namespace{ExpressionRange.cpp}::fpRangeFromDecimal(), get_agg_initial_val(), anonymous_namespace{TableFunctionCompilationContext.cpp}::get_llvm_type_from_sql_column_type(), foreign_storage::FloatPointValidator< T >::getMinMaxBoundsAsStrings(), StorageIOFacility::getRsBufferNoPadding(), inline_fp_null_val(), anonymous_namespace{Execute.cpp}::inline_null_val(), CgenState::inlineFpNull(), CgenState::inlineNull(), is_supported_type_for_extern_execution(), need_patch_unnest_double(), null_val_bit_pattern(), CodeGenerator::NullCheckCodegen::NullCheckCodegen(), numeric_type_name(), Executor::reduceResults(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_floating_point_mapping(), foreign_storage::ParquetFixedLengthEncoder< V, T >::validateIntegralOrFloatingPointValue(), and foreign_storage::FloatPointValidator< T >::valueWithinBounds().

502 { return type == kFLOAT || type == kDOUBLE; }
SQLTypes type
Definition: sqltypes.h:759

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_geometry ( ) const
inline

Definition at line 510 of file sqltypes.h.

References IS_GEO, and type.

Referenced by advance_slot(), advance_target_ptr_col_wise(), advance_target_ptr_row_wise(), Parser::InsertStmt::analyze(), Parser::InsertValuesStmt::analyze(), Catalog_Namespace::Catalog::buildMaps(), TargetExprCodegen::codegen(), GroupByAndAggregate::codegenAggArg(), CodeGenerator::codegenCmp(), CodeGenerator::codegenColVar(), CodeGenerator::codegenHoistedConstantsLoads(), CodeGenerator::codegenHoistedConstantsPlaceholders(), Analyzer::Constant::deep_copy(), Analyzer::Constant::do_cast(), Parser::AddColumnStmt::execute(), import_export::fill_missing_columns(), foreign_storage::GeospatialEncoder::GeospatialEncoder(), spatial_type::NPoints::getOperand(), ResultSet::getTargetValueFromBufferColwise(), ResultSet::getTargetValueFromBufferRowwise(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_array_column(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_geo_column(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_scalar_column(), isGeometry(), Fragmenter_Namespace::isStringVectorData(), foreign_storage::ParquetDataWrapper::loadBuffersUsingLazyParquetChunkLoader(), ResultSet::makeGeoTargetValue(), Parser::OperExpr::normalize(), null_val_bit_pattern(), Analyzer::GeoConstant::physicalCols(), Parser::InsertIntoTableAsSelectStmt::populateData(), ResultSetReductionJIT::reduceOneSlot(), ResultSetStorage::reduceOneSlot(), ddl_utils::set_default_encoding(), anonymous_namespace{TargetExprBuilder.cpp}::target_has_geo(), ddl_utils::validate_and_set_compressed_encoding(), ddl_utils::validate_and_set_none_encoding(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_geospatial_mapping(), DBHandler::value_to_thrift_column(), and Analyzer::Constant::~Constant().

510 { return IS_GEO(type); }
SQLTypes type
Definition: sqltypes.h:759
#define IS_GEO(T)
Definition: sqltypes.h:245

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_high_precision_timestamp ( ) const
inline

Definition at line 746 of file sqltypes.h.

References dimension, get_dimension(), kTIMESTAMP, and type.

Referenced by CodeGenerator::codegenDateTruncHighPrecisionTimestamps(), CodeGenerator::codegenExtractHighPrecisionTimestamps(), Analyzer::Constant::do_cast(), anonymous_namespace{ExpressionRange.cpp}::getDateTimePrecisionCastRange(), DateTimeTranslator::getDateTruncConstantValue(), DateTimeTranslator::getExtractFromTimeConstantValue(), and ddl_utils::validate_and_set_fixed_encoding().

746  {
747  if (type == kTIMESTAMP) {
748  const auto dimension = get_dimension();
749  if (dimension > 0) {
750  return true;
751  }
752  }
753  return false;
754  }
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:325
SQLTypes type
Definition: sqltypes.h:759
int dimension
Definition: sqltypes.h:761

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_integer ( ) const
inline

Definition at line 500 of file sqltypes.h.

References IS_INTEGER, and type.

Referenced by Analyzer::Constant::add_cast(), Parser::FunctionRef::analyze(), Analyzer::BinOper::analyze_type_info(), CodeGenerator::castArrayPointer(), CodeGenerator::codegenAdd(), CodeGenerator::codegenCast(), CodeGenerator::codegenCastBetweenIntTypes(), CodeGenerator::codegenCastFromFp(), CodeGenerator::codegenCmp(), CodeGenerator::codegenHoistedConstantsLoads(), CodeGenerator::codegenMod(), CodeGenerator::codegenMul(), CodeGenerator::codegenSub(), Analyzer::BinOper::common_numeric_type(), NumericConverterFactory< SOURCE_TYPE, TARGET_TYPE >::create(), anonymous_namespace{ArrowResultSetConverter.cpp}::create_or_append_validity(), ArrowForeignStorageBase::generateNullValues(), ArrowForeignStorageBase::generateSentinelValues(), get_agg_type(), anonymous_namespace{TableFunctionCompilationContext.cpp}::get_llvm_type_from_sql_column_type(), foreign_storage::IntegralFixedLengthBoundsValidator< T >::getMinMaxBoundsAsStrings(), inline_fixed_encoding_null_val(), anonymous_namespace{QueryMemoryDescriptor.cpp}::is_int_and_no_bigger_than(), Fragmenter_Namespace::is_integral(), is_supported_type_for_extern_execution(), numeric_type_name(), pair_to_double(), Parser::InsertIntoTableAsSelectStmt::populateData(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), Executor::reduceResults(), anonymous_namespace{InputMetadata.cpp}::uses_int_meta(), foreign_storage::ParquetUnsignedFixedLengthEncoder< V, T, U >::validate(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_integral_mapping(), foreign_storage::ParquetFixedLengthEncoder< V, T >::validateIntegralOrFloatingPointValue(), and foreign_storage::IntegralFixedLengthBoundsValidator< T >::valueWithinBounds().

500 { return IS_INTEGER(type); }
#define IS_INTEGER(T)
Definition: sqltypes.h:239
SQLTypes type
Definition: sqltypes.h:759

+ Here is the caller graph for this function:

HOST DEVICE bool SQLTypeInfo::is_null ( const Datum d) const
inline

Definition at line 618 of file sqltypes.h.

References Datum::arrayval, Datum::bigintval, Datum::boolval, Datum::doubleval, Datum::floatval, Datum::intval, VarlenDatum::is_null, kARRAY, kBIGINT, kBOOLEAN, kCHAR, kDATE, kDECIMAL, kDOUBLE, kFLOAT, kINT, kNULLT, kNUMERIC, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, NULL_BIGINT, NULL_BOOLEAN, NULL_DOUBLE, NULL_FLOAT, NULL_INT, NULL_SMALLINT, NULL_TINYINT, Datum::smallintval, Datum::tinyintval, and type.

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

618  {
619  // assuming Datum is always uncompressed
620  switch (type) {
621  case kBOOLEAN:
622  return (int8_t)d.boolval == NULL_BOOLEAN;
623  case kTINYINT:
624  return d.tinyintval == NULL_TINYINT;
625  case kSMALLINT:
626  return d.smallintval == NULL_SMALLINT;
627  case kINT:
628  return d.intval == NULL_INT;
629  case kBIGINT:
630  case kNUMERIC:
631  case kDECIMAL:
632  return d.bigintval == NULL_BIGINT;
633  case kFLOAT:
634  return d.floatval == NULL_FLOAT;
635  case kDOUBLE:
636  return d.doubleval == NULL_DOUBLE;
637  case kTIME:
638  case kTIMESTAMP:
639  case kDATE:
640  return d.bigintval == NULL_BIGINT;
641  case kTEXT:
642  case kVARCHAR:
643  case kCHAR:
644  // @TODO handle null strings
645  break;
646  case kNULLT:
647  return true;
648  case kARRAY:
649  return d.arrayval == NULL || d.arrayval->is_null;
650  default:
651  break;
652  }
653  return false;
654  }
int8_t tinyintval
Definition: sqltypes.h:206
#define NULL_DOUBLE
Definition: sqltypes.h:48
#define NULL_FLOAT
bool is_null
Definition: sqltypes.h:147
#define NULL_BIGINT
int8_t boolval
Definition: sqltypes.h:205
VarlenDatum * arrayval
Definition: sqltypes.h:212
int32_t intval
Definition: sqltypes.h:208
#define NULL_INT
float floatval
Definition: sqltypes.h:210
int64_t bigintval
Definition: sqltypes.h:209
int16_t smallintval
Definition: sqltypes.h:207
#define NULL_BOOLEAN
Definition: sqltypes.h:51
Definition: sqltypes.h:52
Definition: sqltypes.h:40
#define NULL_TINYINT
SQLTypes type
Definition: sqltypes.h:759
#define NULL_SMALLINT
Definition: sqltypes.h:44
double doubleval
Definition: sqltypes.h:211

+ Here is the caller graph for this function:

HOST DEVICE bool SQLTypeInfo::is_null ( const int8_t *  val) const
inline

Definition at line 655 of file sqltypes.h.

References kDOUBLE, kFLOAT, kNULLT, NULL_BIGINT, NULL_DOUBLE, NULL_FLOAT, NULL_INT, NULL_SMALLINT, NULL_TINYINT, size, and type.

655  {
656  if (type == kFLOAT) {
657  return *(float*)val == NULL_FLOAT;
658  }
659  if (type == kDOUBLE) {
660  return *(double*)val == NULL_DOUBLE;
661  }
662  // val can be either compressed or uncompressed
663  switch (size) {
664  case 1:
665  return *val == NULL_TINYINT;
666  case 2:
667  return *(int16_t*)val == NULL_SMALLINT;
668  case 4:
669  return *(int32_t*)val == NULL_INT;
670  case 8:
671  return *(int64_t*)val == NULL_BIGINT;
672  case kNULLT:
673  return true;
674  default:
675  // @TODO(wei) handle null strings
676  break;
677  }
678  return false;
679  }
#define NULL_DOUBLE
#define NULL_FLOAT
#define NULL_BIGINT
#define NULL_INT
#define NULL_TINYINT
SQLTypes type
Definition: sqltypes.h:759
#define NULL_SMALLINT
HOST DEVICE bool SQLTypeInfo::is_null_fixlen_array ( const int8_t *  val,
int  array_size 
) const
inline

Definition at line 680 of file sqltypes.h.

References kARRAY, kDOUBLE, kFLOAT, kNULLT, NULL_ARRAY_BIGINT, NULL_ARRAY_DOUBLE, NULL_ARRAY_FLOAT, NULL_ARRAY_INT, NULL_ARRAY_SMALLINT, NULL_ARRAY_TINYINT, size, subtype, and type.

Referenced by ChunkIter_get_nth().

680  {
681  // Check if fixed length array has a NULL_ARRAY sentinel as the first element
682  if (type == kARRAY && val && array_size > 0 && array_size == size) {
683  // Need to create element type to get the size, but can't call get_elem_type()
684  // since this is a HOST DEVICE function. Going through copy constructor instead.
685  auto elem_ti{*this};
686  elem_ti.set_type(subtype);
687  elem_ti.set_subtype(kNULLT);
688  auto elem_size = elem_ti.get_storage_size();
689  if (elem_size < 1) {
690  return false;
691  }
692  if (subtype == kFLOAT) {
693  return *(float*)val == NULL_ARRAY_FLOAT;
694  }
695  if (subtype == kDOUBLE) {
696  return *(double*)val == NULL_ARRAY_DOUBLE;
697  }
698  switch (elem_size) {
699  case 1:
700  return *val == NULL_ARRAY_TINYINT;
701  case 2:
702  return *(int16_t*)val == NULL_ARRAY_SMALLINT;
703  case 4:
704  return *(int32_t*)val == NULL_ARRAY_INT;
705  case 8:
706  return *(int64_t*)val == NULL_ARRAY_BIGINT;
707  default:
708  return false;
709  }
710  }
711  return false;
712  }
#define NULL_ARRAY_INT
#define NULL_ARRAY_SMALLINT
#define NULL_ARRAY_TINYINT
SQLTypes subtype
Definition: sqltypes.h:760
#define NULL_ARRAY_FLOAT
#define NULL_ARRAY_DOUBLE
SQLTypes type
Definition: sqltypes.h:759
#define NULL_ARRAY_BIGINT

+ Here is the caller graph for this function:

HOST DEVICE bool SQLTypeInfo::is_null_point_coord_array ( const int8_t *  val,
int  array_size 
) const
inline

Definition at line 713 of file sqltypes.h.

References kARRAY, kTINYINT, NULL_ARRAY_COMPRESSED_32, NULL_ARRAY_DOUBLE, size, subtype, and type.

Referenced by ChunkIter_get_nth_point_coords().

714  {
715  if (type == kARRAY && subtype == kTINYINT && val && array_size > 0 &&
716  array_size == size) {
717  if (array_size == 2 * sizeof(double)) {
718  return *(double*)val == NULL_ARRAY_DOUBLE;
719  }
720  if (array_size == 2 * sizeof(int32_t)) {
721  return *(uint32_t*)val == NULL_ARRAY_COMPRESSED_32;
722  }
723  }
724  return false;
725  }
#define NULL_ARRAY_COMPRESSED_32
SQLTypes subtype
Definition: sqltypes.h:760
#define NULL_ARRAY_DOUBLE
SQLTypes type
Definition: sqltypes.h:759

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_string ( ) const
inline

Definition at line 498 of file sqltypes.h.

References IS_STRING, and type.

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(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::create_parquet_none_type_encoder(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::create_parquet_string_encoder(), CodeGenerator::createInValuesBitmap(), Analyzer::Constant::deep_copy(), Catalog_Namespace::Catalog::delDictionary(), Parser::InsertValuesStmt::determineLeafIndex(), Analyzer::Constant::do_cast(), RelAlgExecutor::executeSimpleInsert(), get_agg_initial_val(), get_array_context_logical_size(), import_export::TypedImportBuffer::get_data_block_pointers(), anonymous_namespace{TargetExprBuilder.cpp}::get_initial_agg_val(), anonymous_namespace{TableFunctionCompilationContext.cpp}::get_llvm_type_from_sql_column_type(), Catalog_Namespace::Catalog::getColumnDictDirectory(), import_export::Loader::getStringDict(), ResultSet::getTargetValueFromBufferRowwise(), CodeGenerator::hashJoinLhs(), inline_fixed_encoding_null_val(), inline_int_null_val(), anonymous_namespace{Execute.cpp}::inline_null_val(), CgenState::inlineIntNull(), is_castable(), is_dict_encoded_string(), foreign_storage::csv_file_buffer_parser::is_null_datum(), is_real_str_or_array(), is_supported_type_for_extern_execution(), Fragmenter_Namespace::isStringVectorData(), ResultSet::makeVarlenTargetValue(), Executor::needLinearizeAllFragments(), Parser::CaseExpr::normalize(), null_val_bit_pattern(), import_export::NullArray(), numeric_type_name(), Parser::InsertIntoTableAsSelectStmt::populateData(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), ResultSetReductionJIT::reduceOneSlot(), ResultSetStorage::reduceOneSlot(), ddl_utils::set_default_encoding(), import_export::StringToArray(), import_export::TDatumToArrayDatum(), ExpressionRange::typeSupportsRange(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumns(), anonymous_namespace{InputMetadata.cpp}::uses_int_meta(), ddl_utils::validate_and_set_dictionary_encoding(), ddl_utils::validate_and_set_none_encoding(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_string_mapping(), TransientStringLiteralsVisitor::visitConstant(), StorageIOFacility::yieldUpdateCallback(), and Analyzer::Constant::~Constant().

498 { return IS_STRING(type); }
#define IS_STRING(T)
Definition: sqltypes.h:244
SQLTypes type
Definition: sqltypes.h:759
bool SQLTypeInfo::is_string_array ( ) const
inline

Definition at line 499 of file sqltypes.h.

References IS_STRING, kARRAY, subtype, and type.

Referenced by Catalog_Namespace::Catalog::delDictionary(), anonymous_namespace{TypedDataAccessors.h}::get_element_size(), Catalog_Namespace::Catalog::getColumnDictDirectory(), ddl_utils::set_default_encoding(), ddl_utils::validate_and_set_array_size(), ddl_utils::validate_and_set_dictionary_encoding(), and ddl_utils::validate_and_set_none_encoding().

499 { return (type == kARRAY) && IS_STRING(subtype); }
SQLTypes subtype
Definition: sqltypes.h:760
#define IS_STRING(T)
Definition: sqltypes.h:244
SQLTypes type
Definition: sqltypes.h:759

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_subtype_dict_encoded_string ( ) const
inline

Definition at line 539 of file sqltypes.h.

References compression, IS_STRING, kENCODING_DICT, and subtype.

539  {
541  }
SQLTypes subtype
Definition: sqltypes.h:760
EncodingType compression
Definition: sqltypes.h:765
#define IS_STRING(T)
Definition: sqltypes.h:244
bool SQLTypeInfo::is_time ( ) const
inline

Definition at line 504 of file sqltypes.h.

References is_datetime(), and type.

Referenced by Analyzer::Constant::add_cast(), Analyzer::BinOper::analyze_type_info(), CodeGenerator::codegenCast(), CodeGenerator::codegenCmp(), CodeGenerator::codegenHoistedConstantsLoads(), anonymous_namespace{ArrowResultSetConverter.cpp}::create_or_append_validity(), Analyzer::Constant::do_cast(), inline_fixed_encoding_null_val(), anonymous_namespace{Execute.cpp}::inline_null_val(), anonymous_namespace{RelAlgTranslator.cpp}::is_agg_supported_for_type(), Fragmenter_Namespace::is_integral(), CodeGenerator::NullCheckCodegen::NullCheckCodegen(), numeric_type_name(), Parser::InsertIntoTableAsSelectStmt::populateData(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), Executor::reduceResults(), import_export::StringToArray(), import_export::anonymous_namespace{QueryExporterCSV.cpp}::target_value_to_string(), ExpressionRange::typeSupportsRange(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), and anonymous_namespace{InputMetadata.cpp}::uses_int_meta().

504 { return is_datetime(type); }
SQLTypes type
Definition: sqltypes.h:759
constexpr auto is_datetime(SQLTypes type)
Definition: sqltypes.h:257

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_timeinterval ( ) const
inline
bool SQLTypeInfo::is_varlen ( ) const
inline

Definition at line 523 of file sqltypes.h.

References compression, IS_GEO, IS_STRING, kARRAY, kENCODING_DICT, and type.

Referenced by Chunk_NS::Chunk::createChunkBuffer(), get_agg_type(), Chunk_NS::Chunk::getChunkBuffer(), Chunk_NS::Chunk::getNumElemsForBytesInsertData(), Chunk_NS::Chunk::initEncoder(), is_varlen_indeed(), Chunk_NS::Chunk::isChunkOnDevice(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), ResultSetReductionJIT::reduceOneSlot(), ResultSetStorage::reduceOneSlot(), ResultSetStorage::reduceOneSlotBaseline(), ResultSetStorage::reduceOneSlotSingleValue(), and foreign_storage::update_stats().

523  { // TODO: logically this should ignore fixlen arrays
524  return (IS_STRING(type) && compression != kENCODING_DICT) || type == kARRAY ||
525  IS_GEO(type);
526  }
EncodingType compression
Definition: sqltypes.h:765
#define IS_STRING(T)
Definition: sqltypes.h:244
SQLTypes type
Definition: sqltypes.h:759
#define IS_GEO(T)
Definition: sqltypes.h:245

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_varlen_array ( ) const
inline

Definition at line 507 of file sqltypes.h.

References kARRAY, size, and type.

Referenced by Fragmenter_Namespace::get_var_len_null_array_indexes().

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

+ Here is the caller graph for this function:

bool SQLTypeInfo::is_varlen_indeed ( ) const
inline

Definition at line 529 of file sqltypes.h.

References is_fixlen_array(), and is_varlen().

Referenced by foreign_storage::anonymous_namespace{CsvDataWrapper.cpp}::add_placeholder_metadata(), foreign_storage::cache_blocks(), and foreign_storage::Csv::get_placeholder_metadata().

529  {
530  // SQLTypeInfo.is_varlen() is broken with fixedlen array now
531  // and seems left broken for some concern, so fix it locally
532  return is_varlen() && !is_fixlen_array();
533  }
bool is_varlen() const
Definition: sqltypes.h:523
bool is_fixlen_array() const
Definition: sqltypes.h:508

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

HOST DEVICE bool SQLTypeInfo::operator!= ( const SQLTypeInfo rhs) const
inline

Definition at line 548 of file sqltypes.h.

References comp_param, compression, dimension, get_comp_param(), get_compression(), get_dimension(), get_notnull(), get_scale(), get_subtype(), get_type(), kENCODING_NONE, notnull, scale, subtype, TRANSIENT_DICT, and type.

548  {
549  return type != rhs.get_type() || subtype != rhs.get_subtype() ||
550  dimension != rhs.get_dimension() || scale != rhs.get_scale() ||
551  compression != rhs.get_compression() ||
554  notnull != rhs.get_notnull();
555  }
HOST DEVICE SQLTypes get_subtype() const
Definition: sqltypes.h:324
HOST DEVICE int get_scale() const
Definition: sqltypes.h:328
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:323
SQLTypes subtype
Definition: sqltypes.h:760
bool notnull
Definition: sqltypes.h:764
EncodingType compression
Definition: sqltypes.h:765
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:331
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:325
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:332
SQLTypes type
Definition: sqltypes.h:759
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:330
#define TRANSIENT_DICT(ID)
Definition: sqltypes.h:254
int comp_param
Definition: sqltypes.h:766
int dimension
Definition: sqltypes.h:761

+ Here is the call graph for this function:

HOST DEVICE void SQLTypeInfo::operator= ( const SQLTypeInfo rhs)
inline

Definition at line 576 of file sqltypes.h.

References comp_param, compression, dimension, get_comp_param(), get_compression(), get_dimension(), get_notnull(), get_scale(), get_size(), get_subtype(), get_type(), notnull, scale, size, subtype, and type.

576  {
577  type = rhs.get_type();
578  subtype = rhs.get_subtype();
579  dimension = rhs.get_dimension();
580  scale = rhs.get_scale();
581  notnull = rhs.get_notnull();
583  comp_param = rhs.get_comp_param();
584  size = rhs.get_size();
585  }
HOST DEVICE SQLTypes get_subtype() const
Definition: sqltypes.h:324
HOST DEVICE int get_size() const
Definition: sqltypes.h:333
HOST DEVICE int get_scale() const
Definition: sqltypes.h:328
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:323
SQLTypes subtype
Definition: sqltypes.h:760
bool notnull
Definition: sqltypes.h:764
EncodingType compression
Definition: sqltypes.h:765
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:331
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:325
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:332
SQLTypes type
Definition: sqltypes.h:759
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:330
int comp_param
Definition: sqltypes.h:766
int dimension
Definition: sqltypes.h:761

+ Here is the call graph for this function:

HOST DEVICE bool SQLTypeInfo::operator== ( const SQLTypeInfo rhs) const
inline

Definition at line 556 of file sqltypes.h.

References comp_param, compression, dimension, get_comp_param(), get_compression(), get_dimension(), get_notnull(), get_scale(), get_subtype(), get_type(), kENCODING_NONE, notnull, scale, subtype, TRANSIENT_DICT, and type.

556  {
557  return type == rhs.get_type() && subtype == rhs.get_subtype() &&
558  dimension == rhs.get_dimension() && scale == rhs.get_scale() &&
559  compression == rhs.get_compression() &&
562  notnull == rhs.get_notnull();
563  }
HOST DEVICE SQLTypes get_subtype() const
Definition: sqltypes.h:324
HOST DEVICE int get_scale() const
Definition: sqltypes.h:328
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:323
SQLTypes subtype
Definition: sqltypes.h:760
bool notnull
Definition: sqltypes.h:764
EncodingType compression
Definition: sqltypes.h:765
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:331
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:325
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:332
SQLTypes type
Definition: sqltypes.h:759
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:330
#define TRANSIENT_DICT(ID)
Definition: sqltypes.h:254
int comp_param
Definition: sqltypes.h:766
int dimension
Definition: sqltypes.h:761

+ Here is the call graph for this function:

void SQLTypeInfo::set_dimension ( int  d)
inline

Definition at line 415 of file sqltypes.h.

References test_fsi::d, and dimension.

Referenced by Analyzer::BinOper::analyze_type_info(), Catalog_Namespace::Catalog::buildMaps(), parse_numeric(), File_Namespace::FileBuffer::readMetadata(), and ddl_utils::validate_and_set_type().

415 { dimension = d; }
tuple d
Definition: test_fsi.py:9
int dimension
Definition: sqltypes.h:761

+ Here is the caller graph for this function:

void SQLTypeInfo::set_fixed_size ( )
inline

Definition at line 422 of file sqltypes.h.

References get_storage_size(), and size.

Referenced by Parser::QuerySpec::analyze_group_by(), Analyzer::BinOper::common_numeric_type(), import_export::Importer::gdalToColumnDescriptors(), Parser::OperExpr::normalize(), and ddl_utils::validate_and_set_array_size().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void SQLTypeInfo::set_input_srid ( int  d)
inline

Definition at line 417 of file sqltypes.h.

References test_fsi::d, and dimension.

Referenced by import_export::Importer::gdalToColumnDescriptors(), RelAlgTranslator::translateGeoFunctionArg(), RelAlgTranslator::translateGeoLiteral(), and ddl_utils::validate_and_set_type().

417 { dimension = d; }
tuple d
Definition: test_fsi.py:9
int dimension
Definition: sqltypes.h:761

+ Here is the caller graph for this function:

void SQLTypeInfo::set_output_srid ( int  s)
inline

Definition at line 419 of file sqltypes.h.

References scale.

Referenced by import_export::Importer::gdalToColumnDescriptors(), RelAlgTranslator::translateGeoBinaryConstructor(), RelAlgTranslator::translateGeoFunctionArg(), RelAlgTranslator::translateGeoLiteral(), and ddl_utils::validate_and_set_type().

419 { scale = s; }

+ Here is the caller graph for this function:

void SQLTypeInfo::set_precision ( int  d)
inline

Definition at line 416 of file sqltypes.h.

References test_fsi::d, and dimension.

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

416 { dimension = d; }
tuple d
Definition: test_fsi.py:9
int dimension
Definition: sqltypes.h:761

+ Here is the caller graph for this function:

void SQLTypeInfo::set_scale ( int  s)
inline

Definition at line 418 of file sqltypes.h.

References scale.

Referenced by Analyzer::BinOper::analyze_type_info(), Parser::FixedPtLiteral::analyzeValue(), anonymous_namespace{RelAlgTranslator.cpp}::build_type_info(), Catalog_Namespace::Catalog::buildMaps(), parse_numeric(), anonymous_namespace{RelAlgDagBuilder.cpp}::parse_type(), File_Namespace::FileBuffer::readMetadata(), and ddl_utils::validate_and_set_type().

418 { scale = s; }

+ Here is the caller graph for this function:

void SQLTypeInfo::set_size ( int  s)
inline
HOST DEVICE void SQLTypeInfo::set_type ( SQLTypes  t)
inline

Definition at line 413 of file sqltypes.h.

References t, and type.

Referenced by Catalog_Namespace::Catalog::buildMaps(), import_export::Importer::gdalToColumnDescriptors(), Geospatial::GeoTypesFactory::getGeoColumnsImpl(), File_Namespace::FileBuffer::readMetadata(), RelAlgTranslator::translateGeoBinaryConstructor(), RelAlgTranslator::translateGeoFunctionArg(), and ddl_utils::validate_and_set_type().

413 { type = t; }
char * t
SQLTypes type
Definition: sqltypes.h:759

+ Here is the caller graph for this function:

std::string SQLTypeInfo::to_string ( ) const
inline

Definition at line 466 of file sqltypes.h.

References concat(), get_comp_param(), get_compression_name(), get_dimension(), get_elem_type(), get_notnull(), get_scale(), get_size(), subtype, type, and type_name.

Referenced by RelLogicalUnion::checkForMatchingMetaInfoTypes(), DatumToString(), operator<<(), TargetMetaInfo::toString(), TargetInfo::toString(), RexOperator::toString(), and toString().

466  {
467  return concat("(type=",
468  type_name[static_cast<int>(type)],
469  ", dimension=",
470  get_dimension(),
471  ", scale=",
472  get_scale(),
473  ", null=",
474  get_notnull() ? "not nullable" : "nullable",
475  ", name=",
477  ", comp=",
478  get_comp_param(),
479  ", subtype=",
480  type_name[static_cast<int>(subtype)],
481  ", size=",
482  get_size(),
483  ", element_size=",
485  ")");
486  }
HOST DEVICE int get_size() const
Definition: sqltypes.h:333
HOST DEVICE int get_scale() const
Definition: sqltypes.h:328
std::string get_compression_name() const
Definition: sqltypes.h:464
std::string concat(Types &&...parms)
static std::string type_name[kSQLTYPE_LAST]
Definition: sqltypes.h:769
SQLTypes subtype
Definition: sqltypes.h:760
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:325
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:332
SQLTypes type
Definition: sqltypes.h:759
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:330
SQLTypeInfo get_elem_type() const
Definition: sqltypes.h:726

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string SQLTypeInfo::toString ( ) const
inline

Definition at line 465 of file sqltypes.h.

References to_string().

465 { return to_string(); } // for PRINT macro
std::string to_string() const
Definition: sqltypes.h:466

+ Here is the call graph for this function:

bool SQLTypeInfo::transforms ( ) const
inline

Definition at line 519 of file sqltypes.h.

References get_input_srid(), get_output_srid(), IS_GEO, and type.

Referenced by CodeGenerator::codegenGeoBinOper(), CodeGenerator::codegenGeoUOper(), and import_export::importGeoFromLonLat().

519  {
520  return IS_GEO(type) && get_output_srid() != get_input_srid();
521  }
HOST DEVICE int get_input_srid() const
Definition: sqltypes.h:327
SQLTypes type
Definition: sqltypes.h:759
#define IS_GEO(T)
Definition: sqltypes.h:245
HOST DEVICE int get_output_srid() const
Definition: sqltypes.h:329

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

std::string SQLTypeInfo::comp_name
staticprivate
Initial value:
=
{"NONE", "FIXED", "RL", "DIFF", "DICT", "SPARSE", "COMPRESSED", "DAYS"}

Definition at line 770 of file sqltypes.h.

Referenced by get_compression_name().

int SQLTypeInfo::comp_param
private
bool SQLTypeInfo::notnull
private
std::string SQLTypeInfo::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",
"COLUMN",
"COLUMN_LIST"}

Definition at line 769 of file sqltypes.h.

Referenced by get_type_name(), and to_string().


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