OmniSciDB
bf83d84833
|
#include "../Logger/Logger.h"
#include "funcannotations.h"
#include <cfloat>
#include <cstdint>
#include <limits>
#include <type_traits>
Go to the source code of this file.
Classes | |
struct | serialize_detail::IntType< overload > |
struct | serialize_detail::IntType< 1 > |
struct | serialize_detail::IntType< 2 > |
struct | serialize_detail::IntType< 4 > |
struct | serialize_detail::IntType< 8 > |
Namespaces | |
serialize_detail | |
Macros | |
#define | NULL_BOOLEAN INT8_MIN |
#define | NULL_TINYINT INT8_MIN |
#define | NULL_SMALLINT INT16_MIN |
#define | NULL_INT INT32_MIN |
#define | NULL_BIGINT INT64_MIN |
#define | NULL_FLOAT FLT_MIN |
#define | NULL_DOUBLE DBL_MIN |
#define | NULL_ARRAY_BOOLEAN (INT8_MIN + 1) |
#define | NULL_ARRAY_TINYINT (INT8_MIN + 1) |
#define | NULL_ARRAY_SMALLINT (INT16_MIN + 1) |
#define | NULL_ARRAY_INT (INT32_MIN + 1) |
#define | NULL_ARRAY_BIGINT (INT64_MIN + 1) |
#define | NULL_ARRAY_FLOAT (FLT_MIN * 2.0) |
#define | NULL_ARRAY_DOUBLE (DBL_MIN * 2.0) |
#define | NULL_ARRAY_COMPRESSED_32 0x80000000U |
#define | CONSTEXPR constexpr |
Functions | |
template<class T > | |
constexpr int64_t | inline_int_null_value () |
template<class T > | |
constexpr int64_t | inline_int_null_array_value () |
template<class T > | |
constexpr int64_t | max_valid_int_value () |
template<typename T > | |
constexpr T | inline_fp_null_value () |
template<> | |
constexpr float | inline_fp_null_value< float > () |
template<> | |
constexpr double | inline_fp_null_value< double > () |
template<typename T > | |
T | inline_fp_null_array_value () |
template<> | |
constexpr float | inline_fp_null_array_value< float > () |
template<> | |
constexpr double | inline_fp_null_array_value< double > () |
template<typename SQL_TYPE_INFO > | |
int64_t | inline_int_null_val (const SQL_TYPE_INFO &ti) |
template<typename SQL_TYPE_INFO > | |
int64_t | inline_fixed_encoding_null_val (const SQL_TYPE_INFO &ti) |
template<typename SQL_TYPE_INFO > | |
double | inline_fp_null_val (const SQL_TYPE_INFO &ti) |
template<typename SQL_TYPE_INFO > | |
int64_t | inline_int_null_array_val (const SQL_TYPE_INFO &ti) |
template<typename SQL_TYPE_INFO > | |
int64_t | inline_fixed_encoding_null_array_val (const SQL_TYPE_INFO &ti) |
template<typename T , bool array = false> | |
CONSTEXPR DEVICE serialize_detail::IntType < sizeof(T)>::type | serialized_null_value () |
template<typename T , bool array = false> | |
CONSTEXPR DEVICE bool | is_null (const T &value) |
template<typename T , bool array = false> | |
CONSTEXPR DEVICE void | set_null (T &value) |
#define CONSTEXPR constexpr |
Definition at line 46 of file InlineNullValues.h.
Referenced by serialized_null_value().
#define NULL_ARRAY_BIGINT (INT64_MIN + 1) |
Definition at line 39 of file InlineNullValues.h.
Referenced by FixedLengthArrayNoneEncoder::is_null(), and SQLTypeInfo::is_null_fixlen_array().
#define NULL_ARRAY_BOOLEAN (INT8_MIN + 1) |
Definition at line 35 of file InlineNullValues.h.
Referenced by FixedLengthArrayNoneEncoder::is_null().
#define NULL_ARRAY_COMPRESSED_32 0x80000000U |
Definition at line 43 of file InlineNullValues.h.
Referenced by SQLTypeInfo::is_null_point_coord_array().
#define NULL_ARRAY_DOUBLE (DBL_MIN * 2.0) |
Definition at line 41 of file InlineNullValues.h.
Referenced by Parser::InsertValuesStmt::analyze(), Geospatial::compress_coords(), Geospatial::compress_null_point(), GeoPointValueConverter::convertToColumnarFormat(), GeoLinestringValueConverter::convertToColumnarFormat(), GeoPolygonValueConverter::convertToColumnarFormat(), GeoMultiPolygonValueConverter::convertToColumnarFormat(), Geospatial::GeoTypesFactory::getNullGeoColumns(), inline_fp_null_array_value< double >(), FixedLengthArrayNoneEncoder::is_null(), SQLTypeInfo::is_null_fixlen_array(), Geospatial::is_null_point(), SQLTypeInfo::is_null_point_coord_array(), import_export::NullArrayDatum(), import_export::Importer::set_geo_physical_import_buffer(), import_export::Importer::set_geo_physical_import_buffer_columnar(), and foreign_storage::ParquetFixedLengthArrayEncoder::setNullFixedLengthArraySentinel().
#define NULL_ARRAY_FLOAT (FLT_MIN * 2.0) |
Definition at line 40 of file InlineNullValues.h.
Referenced by inline_fp_null_array_value< float >(), FixedLengthArrayNoneEncoder::is_null(), SQLTypeInfo::is_null_fixlen_array(), import_export::NullArrayDatum(), and foreign_storage::ParquetFixedLengthArrayEncoder::setNullFixedLengthArraySentinel().
#define NULL_ARRAY_INT (INT32_MIN + 1) |
Definition at line 38 of file InlineNullValues.h.
Referenced by FixedLengthArrayNoneEncoder::is_null(), and SQLTypeInfo::is_null_fixlen_array().
#define NULL_ARRAY_SMALLINT (INT16_MIN + 1) |
Definition at line 37 of file InlineNullValues.h.
Referenced by FixedLengthArrayNoneEncoder::is_null(), and SQLTypeInfo::is_null_fixlen_array().
#define NULL_ARRAY_TINYINT (INT8_MIN + 1) |
Definition at line 36 of file InlineNullValues.h.
Referenced by FixedLengthArrayNoneEncoder::is_null(), and SQLTypeInfo::is_null_fixlen_array().
#define NULL_BIGINT INT64_MIN |
Definition at line 31 of file InlineNullValues.h.
Referenced by anonymous_namespace{DdlCommandExecutor.cpp}::add_table_details(), datum_to_string(), import_export::QueryExporterCSV::exportResults(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_array_column(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_scalar_column(), SQLTypeInfo::is_null(), Analyzer::anonymous_namespace{Analyzer.cpp}::is_null_value(), result_set::lazy_decode(), Analyzer::Constant::set_null_value(), FixedLengthArrayNoneEncoder::update_elem_stats(), ArrayNoneEncoder::update_elem_stats(), DBHandler::value_to_thrift(), and DBHandler::value_to_thrift_column().
#define NULL_BOOLEAN INT8_MIN |
Definition at line 27 of file InlineNullValues.h.
Referenced by datum_to_string(), import_export::QueryExporterCSV::exportResults(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_array_column(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_scalar_column(), SQLTypeInfo::is_null(), Analyzer::anonymous_namespace{Analyzer.cpp}::is_null_value(), Analyzer::Constant::set_null_value(), FixedLengthArrayNoneEncoder::update_elem_stats(), ArrayNoneEncoder::update_elem_stats(), DBHandler::value_to_thrift(), and DBHandler::value_to_thrift_column().
#define NULL_DOUBLE DBL_MIN |
Definition at line 33 of file InlineNullValues.h.
Referenced by import_export::TypedImportBuffer::add_value(), import_export::TypedImportBuffer::add_values(), Parser::InsertValuesStmt::analyze(), anonymous_namespace{ResultSetIteration.cpp}::calculate_quantile(), CodeGenerator::codegenDiv(), CodeGenerator::codegenFpArith(), CodeGenerator::codegenIsNullNumber(), Geospatial::compress_null_point(), GeoPointValueConverter::convertToColumnarFormat(), GeoLinestringValueConverter::convertToColumnarFormat(), GeoPolygonValueConverter::convertToColumnarFormat(), GeoMultiPolygonValueConverter::convertToColumnarFormat(), import_export::QueryExporterCSV::exportResults(), float_to_double_bin(), Geospatial::GeoPoint::getColumns(), Geospatial::GeoLineString::getColumns(), Geospatial::GeoPolygon::getColumns(), Geospatial::GeoMultiPolygon::getColumns(), Geospatial::GeoTypesFactory::getNullGeoColumns(), inline_fp_null_value< double >(), CgenState::inlineFpNull(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_array_column(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_scalar_column(), SQLTypeInfo::is_null(), Analyzer::anonymous_namespace{Analyzer.cpp}::is_null_value(), ResultSet::isNull(), ResultSet::makeTargetValue(), import_export::NullDatum(), import_export::Importer::set_geo_physical_import_buffer(), import_export::Importer::set_geo_physical_import_buffer_columnar(), Analyzer::Constant::set_null_value(), import_export::TDatumToDatum(), FixedLengthArrayNoneEncoder::update_elem_stats(), ArrayNoneEncoder::update_elem_stats(), DBHandler::value_to_thrift(), and DBHandler::value_to_thrift_column().
#define NULL_FLOAT FLT_MIN |
Definition at line 32 of file InlineNullValues.h.
Referenced by import_export::TypedImportBuffer::add_value(), import_export::TypedImportBuffer::add_values(), CodeGenerator::codegenDiv(), CodeGenerator::codegenFpArith(), CodeGenerator::codegenIsNullNumber(), import_export::QueryExporterCSV::exportResults(), float_to_double_bin(), inline_fp_null_value< float >(), CgenState::inlineFpNull(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_array_column(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_scalar_column(), SQLTypeInfo::is_null(), Analyzer::anonymous_namespace{Analyzer.cpp}::is_null_value(), import_export::NullDatum(), Analyzer::Constant::set_null_value(), import_export::TDatumToDatum(), FixedLengthArrayNoneEncoder::update_elem_stats(), ArrayNoneEncoder::update_elem_stats(), DBHandler::value_to_thrift(), and DBHandler::value_to_thrift_column().
#define NULL_INT INT32_MIN |
Definition at line 30 of file InlineNullValues.h.
Referenced by anonymous_namespace{ResultSetIteration.cpp}::build_string_array_target_value(), GeoPolygonValueConverter::convertToColumnarFormat(), GeoMultiPolygonValueConverter::convertToColumnarFormat(), DictionaryConverterFactory< TARGET_TYPE >::create(), import_export::QueryExporterCSV::exportResults(), JoinColumnIterator::getElementSwitch(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_array_column(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_scalar_column(), SQLTypeInfo::is_null(), Analyzer::anonymous_namespace{Analyzer.cpp}::is_null_value(), result_set::lazy_decode(), ResultSet::makeTargetValue(), Analyzer::Constant::set_null_value(), string_decompress(), FixedLengthArrayNoneEncoder::update_elem_stats(), ArrayNoneEncoder::update_elem_stats(), DBHandler::value_to_thrift(), and DBHandler::value_to_thrift_column().
#define NULL_SMALLINT INT16_MIN |
Definition at line 29 of file InlineNullValues.h.
Referenced by import_export::QueryExporterCSV::exportResults(), JoinColumnIterator::getElementSwitch(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_array_column(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_scalar_column(), SQLTypeInfo::is_null(), Analyzer::anonymous_namespace{Analyzer.cpp}::is_null_value(), result_set::lazy_decode(), Analyzer::Constant::set_null_value(), FixedLengthArrayNoneEncoder::update_elem_stats(), ArrayNoneEncoder::update_elem_stats(), DBHandler::value_to_thrift(), and DBHandler::value_to_thrift_column().
#define NULL_TINYINT INT8_MIN |
Definition at line 28 of file InlineNullValues.h.
Referenced by import_export::QueryExporterCSV::exportResults(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_array_column(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_scalar_column(), SQLTypeInfo::is_null(), Analyzer::anonymous_namespace{Analyzer.cpp}::is_null_value(), Analyzer::Constant::set_null_value(), FixedLengthArrayNoneEncoder::update_elem_stats(), ArrayNoneEncoder::update_elem_stats(), DBHandler::value_to_thrift(), and DBHandler::value_to_thrift_column().
|
inline |
Definition at line 244 of file InlineNullValues.h.
References CHECK, CHECK_EQ, inline_int_null_array_val(), kENCODING_DATE_IN_DAYS, kENCODING_DICT, kENCODING_FIXED, and kENCODING_NONE.
Referenced by import_export::NullArrayDatum(), and foreign_storage::ParquetFixedLengthArrayEncoder::setNullFixedLengthArraySentinel().
|
inline |
Definition at line 148 of file InlineNullValues.h.
References CHECK, CHECK_EQ, inline_int_null_val(), kENCODING_DATE_IN_DAYS, kENCODING_DICT, kENCODING_FIXED, and kENCODING_NONE.
Referenced by import_export::TypedImportBuffer::add_value(), import_export::TypedImportBuffer::add_values(), Parser::InsertValuesStmt::determineLeafIndex(), RelAlgExecutor::executeSimpleInsert(), PerfectJoinHashTable::fetchColumnsForDevice(), BaselineJoinHashTable::fetchColumnsForDevice(), anonymous_namespace{ColumnarResults.cpp}::fixed_encoding_nullable_val(), PerfectJoinHashTable::getHashJoinArgs(), PerfectJoinHashTableBuilder::initOneToManyHashTableOnCpu(), PerfectJoinHashTableBuilder::initOneToOneHashTableOnCpu(), anonymous_namespace{RelAlgExecutor.cpp}::insert_one_dict_str(), anonymous_namespace{WindowContext.cpp}::integer_comparator(), result_set::lazy_decode(), import_export::NullDatum(), anonymous_namespace{ArrowImporter.h}::ArrowValue< void * >::operator const DATA_TYPE(), anonymous_namespace{ArrowImporter.h}::ArrowValue< std::string >::operator const DATA_TYPE(), QueryRewriter::rewriteColumnarUpdate(), and import_export::TDatumToDatum().
T inline_fp_null_array_value | ( | ) |
Definition at line 92 of file InlineNullValues.h.
References logger::FATAL, LOG, and omnisci.dtypes::T.
|
inline |
Definition at line 107 of file InlineNullValues.h.
References NULL_ARRAY_DOUBLE.
Referenced by anonymous_namespace{TypedDataAccessors.h}::put_null_array().
|
inline |
Definition at line 102 of file InlineNullValues.h.
References NULL_ARRAY_FLOAT.
Referenced by anonymous_namespace{TypedDataAccessors.h}::put_null_array().
|
inline |
Definition at line 192 of file InlineNullValues.h.
References CHECK, inline_fp_null_value< double >(), inline_fp_null_value< float >(), kDOUBLE, kFLOAT, and run_benchmark_import::type.
Referenced by GroupByAndAggregate::codegenOutputSlot(), anonymous_namespace{ArrowResultSetConverter.cpp}::create_or_append_validity(), anonymous_namespace{RelAlgTranslator.cpp}::datum_from_scalar_tv(), datum_to_string(), get_agg_initial_val(), anonymous_namespace{TypedDataAccessors.h}::NullSentinelSupplier::get_null_sentinel_for_type(), CgenState::getOrAddLiteral(), anonymous_namespace{Execute.cpp}::inline_null_val(), null_val_bit_pattern(), anonymous_namespace{ArrowImporter.h}::ArrowValue< void * >::operator DATA_TYPE(), pair_to_double(), and synthesize_metadata().
|
inline |
Definition at line 72 of file InlineNullValues.h.
References logger::FATAL, LOG, and omnisci.dtypes::T.
|
inline |
Definition at line 87 of file InlineNullValues.h.
References NULL_DOUBLE.
Referenced by NumericConverterFactory< SOURCE_TYPE, TARGET_TYPE >::create(), anonymous_namespace{TypedDataAccessors.h}::get_scalar(), inline_fp_null_val(), anonymous_namespace{TypedDataAccessors.h}::put_null(), SqliteMemDatabase::runSelect(), and anonymous_namespace{ExternalExecutor.cpp}::vt_column().
|
inline |
Definition at line 82 of file InlineNullValues.h.
References NULL_FLOAT.
Referenced by NumericConverterFactory< SOURCE_TYPE, TARGET_TYPE >::create(), anonymous_namespace{TypedDataAccessors.h}::get_scalar(), inline_fp_null_val(), anonymous_namespace{TypedDataAccessors.h}::put_null(), SqliteMemDatabase::runSelect(), and anonymous_namespace{ExternalExecutor.cpp}::vt_column().
|
inline |
Definition at line 207 of file InlineNullValues.h.
References CHECK_EQ, kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kENCODING_DICT, kENCODING_NONE, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kNUMERIC, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, and run_benchmark_import::type.
Referenced by inline_fixed_encoding_null_array_val().
|
inline |
Definition at line 58 of file InlineNullValues.h.
|
inline |
Definition at line 113 of file InlineNullValues.h.
References CHECK_EQ, kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kENCODING_DICT, kENCODING_NONE, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kNUMERIC, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, and run_benchmark_import::type.
Referenced by ResultSetLogicalValuesBuilder::build(), InValuesBitmap::codegen(), CodeGenerator::codegen(), CodeGenerator::codegenAdd(), CodeGenerator::codegenBinOpWithOverflowForCPU(), CodeGenerator::codegenCastBetweenIntTypes(), CodeGenerator::codegenCastBetweenIntTypesOverflowChecks(), CodeGenerator::codegenDiv(), CodeGenerator::codegenMod(), CodeGenerator::codegenMul(), GroupByAndAggregate::codegenOutputSlot(), CodeGenerator::codegenSub(), anonymous_namespace{ArrowResultSetConverter.cpp}::create_or_append_validity(), CodeGenerator::createInValuesBitmap(), anonymous_namespace{RelAlgTranslator.cpp}::datum_from_scalar_tv(), datum_to_string(), anonymous_namespace{ColumnarResults.cpp}::fixed_encoding_nullable_val(), get_agg_initial_val(), anonymous_namespace{TypedDataAccessors.h}::NullSentinelSupplier::get_null_sentinel_for_type(), getExpressionRange(), RelAlgTranslator::getInIntegerSetExpr(), CgenState::getOrAddLiteral(), inline_fixed_encoding_null_val(), anonymous_namespace{Execute.cpp}::inline_null_val(), CgenState::inlineIntNull(), result_set::lazy_decode(), ResultSet::makeTargetValue(), null_val_bit_pattern(), pair_to_double(), SqliteMemDatabase::runSelect(), and synthesize_metadata().
|
inline |
Definition at line 52 of file InlineNullValues.h.
Definition at line 356 of file InlineNullValues.h.
Referenced by Parser::InsertValuesStmt::analyze(), ArrayNoneEncoder::appendData(), ChunkIter_get_nth(), ChunkIter_get_nth_point_coords(), Fragmenter_Namespace::FixedLenArrayChunkConverter::convertToColumnarFormat(), ArrayValueConverter< ELEMENT_CONVERTER >::convertToColumnarFormat(), RelAlgExecutor::executeSimpleInsert(), import_export::QueryExporterCSV::exportResults(), anonymous_namespace{ResultSetIteration.cpp}::GeoQueryOutputFetchHandler::fetch(), EmbeddedDatabase::Row::getStr(), import_export::import_thread_delimited(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_array_column(), import_export::anonymous_namespace{QueryExporterGDAL.cpp}::insert_scalar_column(), anonymous_namespace{TypedDataAccessors.h}::integer_setter(), foreign_storage::csv_file_buffer_parser::is_null_datum(), Column< T >::isNull(), DBHandler::load_table(), foreign_storage::csv_file_buffer_parser::parse_buffer(), NumericValueConverter< int64_t, TARGET_TYPE >::processArrayBuffer(), DictionaryValueConverter< TARGET_TYPE >::processArrayBuffer(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), SqliteConnector::query_with_text_params(), Fragmenter_Namespace::set_chunk_stats(), ArrowForeignStorageBase::setNullValues(), import_export::StringToArray(), RelAlgTranslator::translateUoper(), and DBHandler::value_to_thrift_column().
|
inline |
Definition at line 66 of file InlineNullValues.h.
|
inline |
Definition at line 327 of file InlineNullValues.h.
References CHECK, CONSTEXPR, and omnisci.dtypes::T.
Definition at line 362 of file InlineNullValues.h.
Referenced by Column< T >::setNull().