OmniSciDB
a5dc49c757
|
Constants for Builtin SQL Types supported by HEAVY.AI. More...
#include "toString.h"
#include "../Logger/Logger.h"
#include "../QueryEngine/Utils/FlatBuffer.h"
#include "Datum.h"
#include "funcannotations.h"
#include "sqltypes_lite.h"
#include <cassert>
#include <ctime>
#include <memory>
#include <ostream>
#include <sstream>
#include <string>
#include <type_traits>
#include <vector>
#include "Shared/DbObjectKeys.h"
#include "InlineNullValues.h"
#include <string_view>
#include "../QueryEngine/DateAdd.h"
#include "../QueryEngine/DateTruncate.h"
#include "../QueryEngine/ExtractFromTime.h"
Go to the source code of this file.
Classes | |
struct | DoNothingDeleter |
struct | FreeDeleter |
struct | HostArrayDatum |
struct | DeviceArrayDatum |
union | DataBlockPtr |
class | SQLTypeInfo |
union | null_value_t |
struct | SqlLiteralArg |
Namespaces | |
sql_constants | |
Macros | |
#define | IS_INTEGER(T) (((T) == kINT) || ((T) == kSMALLINT) || ((T) == kBIGINT) || ((T) == kTINYINT)) |
#define | IS_NUMBER(T) |
#define | IS_STRING(T) (((T) == kTEXT) || ((T) == kVARCHAR) || ((T) == kCHAR)) |
#define | IS_GEO(T) |
#define | IS_INTERVAL(T) ((T) == kINTERVAL_DAY_TIME || (T) == kINTERVAL_YEAR_MONTH) |
#define | IS_DECIMAL(T) ((T) == kNUMERIC || (T) == kDECIMAL) |
#define | IS_GEO_POLY(T) (((T) == kPOLYGON) || ((T) == kMULTIPOLYGON)) |
#define | IS_GEO_LINE(T) (((T) == kLINESTRING) || ((T) == kMULTILINESTRING)) |
#define | IS_GEO_MULTI(T) (((T) == kMULTIPOLYGON) || ((T) == kMULTILINESTRING) || ((T) == kMULTIPOINT)) |
#define | TRANSIENT_DICT(ID) (-(ID)) |
#define | REGULAR_DICT(TRANSIENTID) (-(TRANSIENTID)) |
Typedefs | |
using | ArrayDatum = std::conditional_t< is_cuda_compiler(), DeviceArrayDatum, HostArrayDatum > |
using | StringOffsetT = int32_t |
using | ArrayOffsetT = int32_t |
Enumerations | |
enum | SQLTypes { kNULLT = 0, kBOOLEAN = 1, kCHAR = 2, kVARCHAR = 3, kNUMERIC = 4, kDECIMAL = 5, kINT = 6, kSMALLINT = 7, kFLOAT = 8, kDOUBLE = 9, kTIME = 10, kTIMESTAMP = 11, kBIGINT = 12, kTEXT = 13, kDATE = 14, kARRAY = 15, kINTERVAL_DAY_TIME = 16, kINTERVAL_YEAR_MONTH = 17, kPOINT = 18, kLINESTRING = 19, kPOLYGON = 20, kMULTIPOLYGON = 21, kTINYINT = 22, kGEOMETRY = 23, kGEOGRAPHY = 24, kEVAL_CONTEXT_TYPE = 25, kVOID = 26, kCURSOR = 27, kCOLUMN = 28, kCOLUMN_LIST = 29, kMULTILINESTRING = 30, kMULTIPOINT = 31, kSQLTYPE_LAST = 32 } |
enum | EncodingType { kENCODING_NONE = 0, kENCODING_FIXED = 1, kENCODING_RL = 2, kENCODING_DIFF = 3, kENCODING_DICT = 4, kENCODING_SPARSE = 5, kENCODING_GEOINT = 6, kENCODING_DATE_IN_DAYS = 7, kENCODING_ARRAY = 8, kENCODING_ARRAY_DICT = 9, kENCODING_LAST = 10 } |
Functions | |
std::string | toString (const SQLTypes &type) |
std::ostream & | operator<< (std::ostream &os, SQLTypes const sql_type) |
DEVICE constexpr bool | is_cuda_compiler () |
std::ostream & | operator<< (std::ostream &os, EncodingType const type) |
std::string | toString (const EncodingType &type) |
constexpr auto | is_datetime (SQLTypes type) |
SQLTypes | decimal_to_int_type (const SQLTypeInfo &) |
SQLTypes | string_dict_to_int_type (const SQLTypeInfo &) |
Datum | NullDatum (const SQLTypeInfo &ti) |
bool | IsNullDatum (const Datum d, const SQLTypeInfo &ti) |
Datum | StringToDatum (const std::string_view s, SQLTypeInfo &ti) |
std::string | DatumToString (const Datum d, const SQLTypeInfo &ti) |
int64_t | extract_int_type_from_datum (const Datum datum, const SQLTypeInfo &ti) |
double | extract_fp_type_from_datum (const Datum datum, const SQLTypeInfo &ti) |
bool | DatumEqual (const Datum, const Datum, const SQLTypeInfo &ti) |
int64_t | convert_decimal_value_to_scale (const int64_t decimal_value, const SQLTypeInfo &type_info, const SQLTypeInfo &new_type_info) |
std::ostream & | operator<< (std::ostream &os, const SQLTypeInfo &type_info) |
SQLTypes | get_int_type_by_size (size_t const nbytes) |
SQLTypeInfo | get_logical_type_info (const SQLTypeInfo &type_info) |
SQLTypeInfo | get_nullable_type_info (const SQLTypeInfo &type_info) |
SQLTypeInfo | get_nullable_logical_type_info (const SQLTypeInfo &type_info) |
int8_t * | append_datum (int8_t *buf, const Datum &d, const SQLTypeInfo &ti) |
auto | generate_column_type (const SQLTypeInfo &elem_ti) |
auto | generate_column_list_type (const SQLTypeInfo &elem_ti) |
DEVICE void | VarlenArray_get_nth (int8_t *buf, int n, ArrayDatum *result, bool *is_end) |
DEVICE void | VarlenArray_get_nth (int8_t *buf, int n, bool uncompress, VarlenDatum *result, bool *is_end) |
void | getFlatBufferNDimsAndSizes (const int64_t items_count, const int64_t max_nof_values, const SQLTypeInfo &ti, size_t &ndims, int64_t &max_nof_sizes) |
int64_t | getFlatBufferSize (int64_t items_count, int64_t max_nof_values, const SQLTypeInfo &ti) |
null_value_t | get_null_value (const SQLTypeInfo &ti) |
void | initializeFlatBuffer (FlatBufferManager &m, int64_t items_count, int64_t max_nof_values, const SQLTypeInfo &ti) |
bool | geo_promoted_type_match (const SQLTypes a, const SQLTypes b) |
Variables | |
static constexpr int32_t | sql_constants::kMaxNumericPrecision |
static constexpr int32_t | sql_constants::kMaxRepresentableNumericPrecision |
Constants for Builtin SQL Types supported by HEAVY.AI.
Definition in file sqltypes.h.
Definition at line 314 of file sqltypes.h.
#define IS_GEO | ( | T | ) |
Definition at line 310 of file sqltypes.h.
Referenced by spatial_type::Distance::codegenLoads(), RelAlgExecutor::createTableFunctionWorkUnit(), Catalog_Namespace::Catalog::expandGeoColumn(), SQLTypeInfo::get_elem_type(), SQLTypeInfo::get_type_name(), Executor::getColLazyFetchInfo(), anonymous_namespace{DdlCommandExecutor.cpp}::JsonColumnSqlType::getParam1(), anonymous_namespace{DdlCommandExecutor.cpp}::JsonColumnSqlType::getParam2(), EmbeddedDatabase::DBEngineImpl::getTableDetails(), import_export::import_thread_delimited(), SQLTypeInfo::is_geometry(), SQLTypeInfo::is_varlen(), ResultSet::isGeoColOnGpu(), DBHandler::populateThriftColumnType(), foreign_storage::TextFileBufferParser::processGeoColumn(), foreign_storage::TextFileBufferParser::processInvalidGeoColumn(), ThriftSerializers::target_meta_info_to_thrift(), thrift_to_name(), SQLTypeInfo::transforms(), RelAlgTranslator::translateGeoColumn(), RelAlgTranslator::translateGeoFunctionArg(), RelAlgTranslator::translateUnaryGeoFunction(), type_info_from_thrift(), ThriftSerializers::type_info_to_thrift(), ddl_utils::validate_and_set_type(), and anonymous_namespace{RelAlgExecutor.cpp}::RexUsedInputsVisitor::visitInput().
#define IS_GEO_LINE | ( | T | ) | (((T) == kLINESTRING) || ((T) == kMULTILINESTRING)) |
Definition at line 316 of file sqltypes.h.
#define IS_GEO_MULTI | ( | T | ) | (((T) == kMULTIPOLYGON) || ((T) == kMULTILINESTRING) || ((T) == kMULTIPOINT)) |
Definition at line 317 of file sqltypes.h.
Referenced by spatial_type::NumGeometries::codegenLoads().
#define IS_GEO_POLY | ( | T | ) | (((T) == kPOLYGON) || ((T) == kMULTIPOLYGON)) |
Definition at line 315 of file sqltypes.h.
Referenced by CodeGenerator::codegenBoundingBoxIntersect(), and RelAlgTranslator::translateUnaryGeoFunction().
#define IS_INTEGER | ( | T | ) | (((T) == kINT) || ((T) == kSMALLINT) || ((T) == kBIGINT) || ((T) == kTINYINT)) |
Definition at line 304 of file sqltypes.h.
Referenced by Analyzer::StringOper::check_operand_types(), anonymous_namespace{ArrowResultSetConverter.cpp}::get_physical_type(), getArrowImportType(), StringOps_Namespace::StringOpInfo::getIntLiteral(), StringOps_Namespace::StringOpInfo::intLiteralArgAtIdxExists(), SQLTypeInfo::is_integer(), StringOps_Namespace::StringOpInfo::isLiteralArgNull(), StringOps_Namespace::operator<<(), import_export::parse_add_metadata_columns(), and ddl_utils::validate_and_set_fixed_encoding().
#define IS_INTERVAL | ( | T | ) | ((T) == kINTERVAL_DAY_TIME || (T) == kINTERVAL_YEAR_MONTH) |
Definition at line 313 of file sqltypes.h.
Referenced by SQLTypeInfo::is_timeinterval().
#define IS_NUMBER | ( | T | ) |
Definition at line 306 of file sqltypes.h.
Referenced by generate_column_type(), SQLTypeInfo::is_number(), and anonymous_namespace{EquiJoinCondition.cpp}::make_composite_equals_impl().
Definition at line 309 of file sqltypes.h.
Referenced by import_export::TypedImportBuffer::add_value(), import_export::TypedImportBuffer::add_values(), import_export::TypedImportBuffer::addDefaultValues(), import_export::TypedImportBuffer::clear(), foreign_storage::TextFileBufferParser::convertImportBuffersToDataBlocks(), Encoder::Create(), import_export::fill_missing_columns(), import_export::Loader::fillShardRow(), import_export::Detector::find_best_encodings(), import_export::TypedImportBuffer::get_data_block_pointers(), import_export::Loader::getStringDict(), StringOps_Namespace::StringOpInfo::getStringLiteral(), foreign_storage::anonymous_namespace{InternalSystemDataWrapper.cpp}::initialize_import_buffers(), SQLTypeInfo::is_string(), SQLTypeInfo::is_string_array(), SQLTypeInfo::is_subtype_dict_encoded_string(), SQLTypeInfo::is_varlen(), StringOps_Namespace::StringOpInfo::isLiteralArgNull(), anonymous_namespace{EquiJoinCondition.cpp}::make_composite_equals_impl(), StringOps_Namespace::operator<<(), foreign_storage::ParseBufferRequest::ParseBufferRequest(), import_export::TypedImportBuffer::pop_value(), StringOps_Namespace::StringOpInfo::stringLiteralArgAtIdxExists(), RelAlgTranslator::translateGeoFunctionArg(), import_export::TypedImportBuffer::TypedImportBuffer(), and import_export::TypedImportBuffer::~TypedImportBuffer().
#define REGULAR_DICT | ( | TRANSIENTID | ) | (-(TRANSIENTID)) |
Definition at line 323 of file sqltypes.h.
Referenced by RowSetMemoryOwner::getOrAddStringDictProxy().
#define TRANSIENT_DICT | ( | ID | ) | (-(ID)) |
Definition at line 322 of file sqltypes.h.
Referenced by Analyzer::CaseExpr::add_cast(), Parser::common_string_type(), Analyzer::anonymous_namespace{Analyzer.cpp}::has_same_dict(), SQLTypeInfo::operator!=(), and SQLTypeInfo::operator==().
using ArrayDatum = std::conditional_t<is_cuda_compiler(), DeviceArrayDatum, HostArrayDatum> |
Definition at line 229 of file sqltypes.h.
using ArrayOffsetT = int32_t |
Definition at line 1496 of file sqltypes.h.
using StringOffsetT = int32_t |
Definition at line 1495 of file sqltypes.h.
enum EncodingType |
Enumerator | |
---|---|
kENCODING_NONE | |
kENCODING_FIXED | |
kENCODING_RL | |
kENCODING_DIFF | |
kENCODING_DICT | |
kENCODING_SPARSE | |
kENCODING_GEOINT | |
kENCODING_DATE_IN_DAYS | |
kENCODING_ARRAY | |
kENCODING_ARRAY_DICT | |
kENCODING_LAST |
Definition at line 240 of file sqltypes.h.
enum SQLTypes |
Definition at line 65 of file sqltypes.h.
int8_t* append_datum | ( | int8_t * | buf, |
const Datum & | d, | ||
const SQLTypeInfo & | ti | ||
) |
Definition at line 580 of file Datum.cpp.
References Datum::bigintval, Datum::boolval, Datum::doubleval, Datum::floatval, SQLTypeInfo::get_type(), Datum::intval, SQLTypeInfo::is_dict_encoded_string(), kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kDOUBLE, kFLOAT, kINT, kNUMERIC, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, Datum::smallintval, string_dict_to_int_type(), Datum::tinyintval, run_benchmark_import::type, and UNREACHABLE.
Referenced by RelAlgExecutor::executeSimpleInsert(), import_export::NullArray(), import_export::StringToArray(), and import_export::TDatumToArrayDatum().
int64_t convert_decimal_value_to_scale | ( | const int64_t | decimal_value, |
const SQLTypeInfo & | type_info, | ||
const SQLTypeInfo & | new_type_info | ||
) |
Definition at line 624 of file Datum.cpp.
References anonymous_namespace{Datum.cpp}::convert_decimal_value_to_scale_internal(), and SQLTypeInfo::get_scale().
Referenced by import_export::TypedImportBuffer::addDefaultValues(), Analyzer::Constant::cast_number(), anonymous_namespace{ArrowImporter.h}::ArrowValue< arrow::Decimal128 >::operator DATA_TYPE(), parse_numeric(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), and ddl_utils::anonymous_namespace{DdlUtils.cpp}::validate_literal().
bool DatumEqual | ( | const Datum | , |
const Datum | , | ||
const SQLTypeInfo & | ti | ||
) |
Definition at line 408 of file Datum.cpp.
References Datum::bigintval, Datum::boolval, Datum::doubleval, Datum::floatval, SQLTypeInfo::get_compression(), SQLTypeInfo::get_type(), Datum::intval, kBIGINT, kBOOLEAN, kCHAR, kDATE, kDECIMAL, kDOUBLE, kENCODING_DICT, kFLOAT, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kNUMERIC, kPOINT, kPOLYGON, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, Datum::smallintval, Datum::stringval, and Datum::tinyintval.
Referenced by IsNullDatum(), ChunkMetadata::operator==(), FixedLengthArrayNoneEncoder::resetChunkStats(), and ArrayNoneEncoder::resetChunkStats().
std::string DatumToString | ( | const Datum | d, |
const SQLTypeInfo & | ti | ||
) |
Definition at line 460 of file Datum.cpp.
References Datum::bigintval, Datum::boolval, CHECK_EQ, CHECK_LE, CHECK_LT, Datum::doubleval, Datum::floatval, shared::formatDate(), shared::formatDateTime(), shared::formatHMS(), SQLTypeInfo::get_dimension(), SQLTypeInfo::get_scale(), SQLTypeInfo::get_type(), SQLTypeInfo::get_type_name(), Datum::intval, kBIGINT, kBOOLEAN, kCHAR, kDATE, kDECIMAL, kDOUBLE, kFLOAT, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kNUMERIC, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, Datum::smallintval, Datum::stringval, Datum::tinyintval, to_string(), and SQLTypeInfo::to_string().
Referenced by anonymous_namespace{TableFunctionExecutionContext.cpp}::append_literal_buffer(), Analyzer::Constant::cast_to_string(), foreign_storage::datetime_to_string(), foreign_storage::TypedParquetInPlaceEncoder< V, V >::integralTypeToString(), anonymous_namespace{ArrowImporter.h}::ArrowValue< int64_t >::operator DATA_TYPE(), operator<<(), import_export::anonymous_namespace{QueryExporterCSV.cpp}::target_value_to_string(), Analyzer::Constant::toString(), Timestamp::toString(), Fragmenter_Namespace::InsertOrderFragmenter::updateChunkStats(), and ScalarExprToSql::visitConstant().
SQLTypes decimal_to_int_type | ( | const SQLTypeInfo & | ) |
Definition at line 561 of file Datum.cpp.
References get_int_type_by_size(), and SQLTypeInfo::get_size().
Referenced by import_export::TypedImportBuffer::add_value(), WindowFunctionContext::buildAggregationTreeForPartition(), CodeGenerator::codegen(), CodeGenerator::codegenIntConst(), anonymous_namespace{LogicalIR.cpp}::contains_unsafe_division(), extract_int_type_from_datum(), import_export::Loader::fillShardRow(), anonymous_namespace{ColumnIR.cpp}::get_col_decoder(), import_export::anonymous_namespace{Importer.cpp}::get_type_for_datum(), anonymous_namespace{Datum.cpp}::get_type_for_datum(), CgenState::getOrAddLiteral(), ChunkMetadata::isPlaceholder(), ResultSet::makeTargetValue(), import_export::TypedImportBuffer::pop_value(), import_export::TDatumToDatum(), anonymous_namespace{ExpressionRewrite.cpp}::ConstantFoldingVisitor::visitBinOper(), and anonymous_namespace{ExpressionRewrite.cpp}::ConstantFoldingVisitor::visitUOper().
double extract_fp_type_from_datum | ( | const Datum | datum, |
const SQLTypeInfo & | ti | ||
) |
Definition at line 549 of file Datum.cpp.
References Datum::doubleval, Datum::floatval, SQLTypeInfo::get_type(), kDOUBLE, kFLOAT, and run_benchmark_import::type.
Referenced by extract_max_stat_fp_type(), and extract_min_stat_fp_type().
int64_t extract_int_type_from_datum | ( | const Datum | datum, |
const SQLTypeInfo & | ti | ||
) |
Definition at line 523 of file Datum.cpp.
References Datum::bigintval, CHECK_EQ, decimal_to_int_type(), SQLTypeInfo::get_compression(), SQLTypeInfo::get_type(), Datum::intval, SQLTypeInfo::is_decimal(), kBIGINT, kBOOLEAN, kCHAR, kDATE, kENCODING_DICT, kINT, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, Datum::smallintval, Datum::tinyintval, and run_benchmark_import::type.
Referenced by extract_max_stat_int_type(), extract_min_stat_int_type(), StringOps_Namespace::StringOpInfo::getIntLiteral(), ChunkMetadata::isPlaceholder(), and StringOps_Namespace::operator<<().
|
inline |
Definition at line 1701 of file sqltypes.h.
References generate_column_type(), kCOLUMN_LIST, kNULLT, and kTIMESTAMP.
Referenced by bind_function().
|
inline |
Definition at line 1629 of file sqltypes.h.
References SQLTypeInfo::get_comp_param(), SQLTypeInfo::get_compression(), SQLTypeInfo::get_dimension(), SQLTypeInfo::get_scale(), SQLTypeInfo::get_subtype(), SQLTypeInfo::get_type(), SQLTypeInfo::getStringDictKey(), IS_NUMBER, kARRAY, kBIGINT, kBOOLEAN, kCOLUMN, kDOUBLE, kENCODING_ARRAY, kENCODING_ARRAY_DICT, kENCODING_DICT, kENCODING_GEOINT, kENCODING_NONE, kFLOAT, kINT, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kNULLT, kPOINT, kPOLYGON, kSMALLINT, kTEXT, kTIMESTAMP, kTINYINT, kVARCHAR, and SQLTypeInfo::set_subtype().
Referenced by bind_function(), and generate_column_list_type().
Definition at line 2031 of file sqltypes.h.
References kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kPOINT, and kPOLYGON.
Referenced by Parser::InsertValuesStmt::analyze(), Geospatial::GeoTypesFactory::getGeoColumns(), import_export::import_thread_delimited(), import_export::import_thread_shapefile(), foreign_storage::TextFileBufferParser::processGeoColumn(), and foreign_storage::GeospatialEncoder::processGeoElement().
|
inline |
Definition at line 1454 of file sqltypes.h.
References kBIGINT, kINT, kSMALLINT, kTINYINT, and UNREACHABLE.
Referenced by WindowFunctionContext::buildAggregationTreeForPartition(), anonymous_namespace{RelAlgExecutor.cpp}::anonymous_namespace{RelAlgExecutor.cpp}::conditionally_change_arg_to_int_type(), and decimal_to_int_type().
|
inline |
Definition at line 1472 of file sqltypes.h.
References SQLTypeInfo::get_compression(), SQLTypeInfo::get_type(), kARRAY, kENCODING_DATE_IN_DAYS, kENCODING_FIXED, kENCODING_NONE, and SQLTypeInfo::set_compression().
Referenced by anonymous_namespace{ColumnFetcher.cpp}::columnarize_result(), anonymous_namespace{ColumnarResults.cpp}::fixed_encoding_nullable_val(), anonymous_namespace{RelAlgExecutor.cpp}::get_logical_type_for_expr(), anonymous_namespace{TypedDataAccessors.h}::NullSentinelSupplier::get_null_sentinel_for_type(), get_nullable_logical_type_info(), target_info::get_target_info_impl(), TableOptimizer::getDeletedColumnStats(), PerfectJoinHashTable::getHashJoinArgs(), getLeafColumnRange(), Parser::CaseExpr::normalize(), TableOptimizer::recomputeColumnMetadata(), Fragmenter_Namespace::InsertOrderFragmenter::updateChunkStats(), and Fragmenter_Namespace::InsertOrderFragmenter::updateColumns().
|
inline |
Definition at line 1893 of file sqltypes.h.
References CHECK_EQ, SQLTypeInfo::get_compression(), SQLTypeInfo::get_logical_size(), SQLTypeInfo::get_subtype(), SQLTypeInfo::get_type(), kARRAY, kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kDOUBLE, kENCODING_DICT, kENCODING_GEOINT, kENCODING_NONE, kFLOAT, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kNUMERIC, kPOINT, kPOLYGON, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, NULL_ARRAY_BIGINT, NULL_ARRAY_BOOLEAN, NULL_ARRAY_COMPRESSED_32, NULL_ARRAY_DOUBLE, NULL_ARRAY_FLOAT, NULL_ARRAY_INT, NULL_ARRAY_SMALLINT, NULL_ARRAY_TINYINT, NULL_BIGINT, NULL_BOOLEAN, NULL_DOUBLE, NULL_FLOAT, NULL_INT, NULL_SMALLINT, NULL_TINYINT, and UNREACHABLE.
|
inline |
Definition at line 1490 of file sqltypes.h.
References get_logical_type_info(), and get_nullable_type_info().
Referenced by anonymous_namespace{RelAlgExecutor.cpp}::get_logical_type_for_expr(), and RelAlgTranslator::translateArrayFunction().
|
inline |
Definition at line 1484 of file sqltypes.h.
References SQLTypeInfo::set_notnull().
Referenced by CodeGenerator::createInValuesBitmap(), Analyzer::Constant::do_cast(), and get_nullable_logical_type_info().
|
inline |
Definition at line 1789 of file sqltypes.h.
References SQLTypeInfo::get_compression(), SQLTypeInfo::get_subtype(), SQLTypeInfo::get_type(), kARRAY, kENCODING_DICT, kENCODING_NONE, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kPOINT, kPOLYGON, kTEXT, and UNREACHABLE.
Referenced by getFlatBufferSize(), and initializeFlatBuffer().
|
inline |
Definition at line 1841 of file sqltypes.h.
References FlatBufferManager::compute_flatbuffer_size(), FlatBufferManager::computeBufferSizeNestedArray(), GeoPointFormatId, SQLTypeInfo::get_compression(), SQLTypeInfo::get_input_srid(), SQLTypeInfo::get_output_srid(), SQLTypeInfo::get_type(), getFlatBufferNDimsAndSizes(), kENCODING_GEOINT, kPOINT, and SQLTypeInfo::toValueType().
Referenced by TableFunctionManager::allocate_output_buffers(), and ColumnarResults::ColumnarResults().
|
inline |
Definition at line 1993 of file sqltypes.h.
References CHECK_EQ, GeoPointFormatId, SQLTypeInfo::get_compression(), SQLTypeInfo::get_input_srid(), get_null_value(), SQLTypeInfo::get_output_srid(), SQLTypeInfo::get_type(), getFlatBufferNDimsAndSizes(), null_value_t::i8, FlatBufferManager::initialize(), FlatBufferManager::initializeNestedArray(), kENCODING_GEOINT, kPOINT, FlatBufferManager::Success, SQLTypeInfo::toLite(), and SQLTypeInfo::toValueType().
Referenced by TableFunctionManager::allocate_output_buffers(), and ColumnarResults::ColumnarResults().
|
inline |
Definition at line 220 of file sqltypes.h.
constexpr auto is_datetime | ( | SQLTypes | type | ) |
Definition at line 325 of file sqltypes.h.
References kDATE, kTIME, and kTIMESTAMP.
Referenced by ColumnDescriptor::getDefaultValueLiteral(), SQLTypeInfo::is_time(), ArrowForeignStorageBase::replaceNullValues(), RexLiteral::RexLiteral(), and ddl_utils::validate_and_set_fixed_encoding().
bool IsNullDatum | ( | const Datum | d, |
const SQLTypeInfo & | ti | ||
) |
Definition at line 331 of file Datum.cpp.
References DatumEqual(), and NullDatum().
Referenced by anonymous_namespace{ExpressionRewrite.cpp}::ConstantFoldingVisitor::visitStringOper().
Datum NullDatum | ( | const SQLTypeInfo & | ti | ) |
Definition at line 288 of file Datum.cpp.
References Datum::bigintval, Datum::boolval, Datum::doubleval, Datum::floatval, import_export::anonymous_namespace{Importer.cpp}::get_type_for_datum(), inline_fixed_encoding_null_val(), Datum::intval, kBIGINT, kBOOLEAN, kDATE, kDOUBLE, kFLOAT, kINT, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kPOINT, kPOLYGON, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, NULL_DOUBLE, NULL_FLOAT, Datum::smallintval, Datum::tinyintval, and run_benchmark_import::type.
Referenced by StringOps_Namespace::compute_jaro_winkler_score(), IsNullDatum(), import_export::NullArray(), and import_export::StringToArray().
|
inline |
Definition at line 176 of file sqltypes.h.
References toString().
|
inline |
Definition at line 256 of file sqltypes.h.
References logger::FATAL, kENCODING_ARRAY, kENCODING_ARRAY_DICT, kENCODING_DATE_IN_DAYS, kENCODING_DICT, kENCODING_DIFF, kENCODING_FIXED, kENCODING_GEOINT, kENCODING_LAST, kENCODING_NONE, kENCODING_RL, kENCODING_SPARSE, LOG, and run_benchmark_import::type.
|
inline |
Definition at line 1444 of file sqltypes.h.
References toString().
SQLTypes string_dict_to_int_type | ( | const SQLTypeInfo & | ) |
Definition at line 565 of file Datum.cpp.
References CHECK, SQLTypeInfo::get_size(), SQLTypeInfo::is_dict_encoded_string(), kINT, kNULLT, kSMALLINT, kTINYINT, and UNREACHABLE.
Referenced by append_datum(), import_export::anonymous_namespace{Importer.cpp}::get_type_for_datum(), anonymous_namespace{Datum.cpp}::get_type_for_datum(), and foreign_storage::ParquetFixedLengthArrayEncoder::setNullFixedLengthArraySentinel().
Datum StringToDatum | ( | const std::string_view | s, |
SQLTypeInfo & | ti | ||
) |
Definition at line 339 of file Datum.cpp.
References Datum::bigintval, Datum::boolval, Datum::doubleval, Datum::floatval, SQLTypeInfo::get_dimension(), SQLTypeInfo::get_type(), SQLTypeInfo::get_type_name(), Datum::intval, kARRAY, kBIGINT, kBOOLEAN, kCOLUMN, kCOLUMN_LIST, kDATE, kDECIMAL, kDOUBLE, kFLOAT, kINT, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kNUMERIC, kPOINT, kPOLYGON, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, parse_numeric(), Datum::smallintval, Datum::tinyintval, and to_upper().
Referenced by import_export::TypedImportBuffer::add_value(), import_export::TypedImportBuffer::addDefaultValues(), Parser::FixedPtLiteral::analyze(), Analyzer::Constant::cast_from_string(), data_conversion::StringViewToScalarEncoder< DataType, MetadataType >::convert(), anonymous_namespace{ArrowImporter.h}::ArrowValue< std::string >::operator DATA_TYPE(), populate_TColumn(), import_export::StringToArray(), and ddl_utils::anonymous_namespace{DdlUtils.cpp}::validate_literal().
|
inline |
Definition at line 103 of file sqltypes.h.
References logger::FATAL, kARRAY, kBIGINT, kBOOLEAN, kCHAR, kCOLUMN, kCOLUMN_LIST, kCURSOR, kDATE, kDECIMAL, kDOUBLE, kEVAL_CONTEXT_TYPE, kFLOAT, kGEOGRAPHY, kGEOMETRY, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kNULLT, kNUMERIC, kPOINT, kPOLYGON, kSMALLINT, kSQLTYPE_LAST, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, kVOID, LOG, and run_benchmark_import::type.
|
inline |
|
inline |
Definition at line 1716 of file sqltypes.h.
References CHECK_EQ, FlatBufferManager::NestedArrayItem< NDIM >::is_null, FlatBufferManager::NestedArrayItem< NDIM >::nof_values, and FlatBufferManager::NestedArrayItem< NDIM >::values.
Referenced by ChunkIter_get_nth(), ChunkIter_get_nth_varlen(), and ResultSet::makeVarlenTargetValue().
|
inline |
Definition at line 1757 of file sqltypes.h.
References CHECK, CHECK_EQ, VarlenDatum::is_null, VarlenDatum::length, and VarlenDatum::pointer.