OmniSciDB
a5dc49c757
|
Classes | |
class | AbstractImporter |
struct | CopyParams |
class | ExpressionParser |
class | ForeignDataImporter |
class | ImportBatchResult |
struct | GeoImportException |
class | ColumnNotGeoError |
struct | BadRowsTracker |
class | ImporterUtils |
class | TypedImportBuffer |
class | Loader |
struct | ImportStatus |
class | DataStreamSink |
class | Detector |
class | Importer |
struct | MetadataColumnInfo |
class | QueryExporter |
class | QueryExporterCSV |
class | QueryExporterGDAL |
class | GCPTransformer |
class | RasterImporter |
Typedefs | |
using | FieldNameToIndexMapType = std::map< std::string, size_t > |
using | ColumnNameToSourceNameMapType = std::map< std::string, std::string > |
using | FeaturePtrVector = std::vector< Geospatial::GDAL::FeatureUqPtr > |
using | ArraySliceRange = std::pair< size_t, size_t > |
using | MetadataColumnInfos = std::vector< MetadataColumnInfo > |
Functions | |
static const std::string | trim_space (const char *field, const size_t len) |
Datum | NullArrayDatum (SQLTypeInfo &ti) |
ArrayDatum | StringToArray (const std::string &s, const SQLTypeInfo &ti, const CopyParams ©_params) |
ArrayDatum | NullArray (const SQLTypeInfo &ti) |
void | addBinaryStringArray (const TDatum &datum, std::vector< std::string > &string_vec) |
Datum | TDatumToDatum (const TDatum &datum, SQLTypeInfo &ti) |
ArrayDatum | TDatumToArrayDatum (const TDatum &datum, const SQLTypeInfo &ti) |
bool | importGeoFromLonLat (double lon, double lat, std::vector< double > &coords, std::vector< double > &bounds, SQLTypeInfo &ti) |
static ImportStatus | import_thread_delimited (int thread_id, Importer *importer, std::unique_ptr< char[]> scratch_buffer, size_t begin_pos, size_t end_pos, size_t total_size, size_t first_row_index_this_buffer, const Catalog_Namespace::SessionInfo *session_info, Executor *executor) |
static ImportStatus | import_thread_shapefile (int thread_id, Importer *importer, OGRCoordinateTransformation *coordinate_transformation, const FeaturePtrVector &features, size_t firstFeature, size_t numFeatures, const FieldNameToIndexMapType &fieldNameToIndexMap, const ColumnNameToSourceNameMapType &columnNameToSourceNameMap, const Catalog_Namespace::SessionInfo *session_info, Executor *executor, const MetadataColumnInfos &metadata_column_infos) |
template<class T > | |
bool | try_cast (const std::string &str) |
void | gdalGatherFilesInArchiveRecursive (const std::string &archive_path, std::vector< std::string > &files) |
std::vector< std::unique_ptr < TypedImportBuffer > > | setup_column_loaders (const TableDescriptor *td, Loader *loader) |
std::vector< std::unique_ptr < TypedImportBuffer > > | fill_missing_columns (const Catalog_Namespace::Catalog *cat, Fragmenter_Namespace::InsertData &insert_data) |
std::unique_ptr< AbstractImporter > | create_importer (Catalog_Namespace::Catalog &catalog, const TableDescriptor *td, const std::string ©_from_source, const import_export::CopyParams ©_params) |
MetadataColumnInfos | parse_add_metadata_columns (const std::string &add_metadata_columns, const std::string &file_path) |
size_t | num_import_threads (const int32_t copy_params_threads) |
Variables | |
static constexpr size_t | kImportFileBufferSize = (1 << 23) |
static constexpr size_t | max_import_buffer_resize_byte_size = 1024 * 1024 * 1024 |
static constexpr bool | PROMOTE_POINT_TO_MULTIPOINT = false |
static constexpr bool | PROMOTE_LINESTRING_TO_MULTILINESTRING = false |
static constexpr bool | PROMOTE_POLYGON_TO_MULTIPOLYGON = true |
static heavyai::shared_mutex | status_mutex |
static std::map< std::string, ImportStatus > | import_status_map |
static const size_t | kImportRowLimit = 10000 |
using import_export::ArraySliceRange = typedef std::pair<size_t, size_t> |
Definition at line 74 of file Importer.h.
using import_export::ColumnNameToSourceNameMapType = typedef std::map<std::string, std::string> |
Definition at line 151 of file Importer.cpp.
using import_export::FeaturePtrVector = typedef std::vector<Geospatial::GDAL::FeatureUqPtr> |
Definition at line 152 of file Importer.cpp.
using import_export::FieldNameToIndexMapType = typedef std::map<std::string, size_t> |
Definition at line 150 of file Importer.cpp.
using import_export::MetadataColumnInfos = typedef std::vector<MetadataColumnInfo> |
Definition at line 36 of file MetadataColumn.h.
|
strong |
Enumerator | |
---|---|
kAutoDetect | |
kNoHeader | |
kHasHeader |
Definition at line 39 of file CopyParams.h.
|
strong |
Enumerator | |
---|---|
kNone | |
kAuto | |
kFile | |
kWorld |
Definition at line 41 of file CopyParams.h.
|
strong |
Enumerator | |
---|---|
kNone | |
kAuto | |
kSmallInt | |
kInt | |
kFloat | |
kDouble | |
kPoint |
Definition at line 40 of file CopyParams.h.
|
strong |
Enumerator | |
---|---|
kUnknown | |
kUnsupported | |
kDelimitedFile | |
kGeoFile | |
kRasterFile | |
kParquetFile | |
kOdbc | |
kRegexParsedFile |
Definition at line 27 of file SourceType.h.
void import_export::addBinaryStringArray | ( | const TDatum & | datum, |
std::vector< std::string > & | string_vec | ||
) |
Definition at line 415 of file Importer.cpp.
Referenced by import_export::TypedImportBuffer::add_value().
std::unique_ptr< AbstractImporter > import_export::create_importer | ( | Catalog_Namespace::Catalog & | catalog, |
const TableDescriptor * | td, | ||
const std::string & | copy_from_source, | ||
const import_export::CopyParams & | copy_params | ||
) |
Definition at line 6287 of file Importer.cpp.
References g_enable_fsi_regex_import, g_enable_legacy_delimited_import, kDelimitedFile, kParquetFile, kRegexParsedFile, and import_export::CopyParams::source_type.
Referenced by Parser::CopyTableStmt::execute(), and DBHandler::import_table().
std::vector< std::unique_ptr< TypedImportBuffer > > import_export::fill_missing_columns | ( | const Catalog_Namespace::Catalog * | cat, |
Fragmenter_Namespace::InsertData & | insert_data | ||
) |
Definition at line 6217 of file Importer.cpp.
References anonymous_namespace{Utm.h}::a, CHECK, ColumnDescriptor::columnId, Fragmenter_Namespace::InsertData::columnIds, ColumnDescriptor::columnName, ColumnDescriptor::columnType, Fragmenter_Namespace::InsertData::data, ColumnDescriptor::default_value, SQLTypeInfo::get_comp_param(), SQLTypeInfo::get_compression(), import_export::TypedImportBuffer::get_data_block_pointers(), SQLTypeInfo::get_physical_cols(), SQLTypeInfo::get_subtype(), SQLTypeInfo::get_type(), Catalog_Namespace::Catalog::getAllColumnMetadataForTable(), Geospatial::GeoTypesFactory::getGeoColumns(), Catalog_Namespace::Catalog::getMetadataForDict(), Fragmenter_Namespace::InsertData::is_default, SQLTypeInfo::is_geometry(), IS_STRING, kARRAY, kENCODING_DICT, import_export::Importer::set_geo_physical_import_buffer(), gpu_enabled::sort(), and Fragmenter_Namespace::InsertData::tableId.
Referenced by RelAlgExecutor::executeSimpleInsert(), DBHandler::insert_data(), and Parser::InsertIntoTableAsSelectStmt::populateData().
void import_export::gdalGatherFilesInArchiveRecursive | ( | const std::string & | archive_path, |
std::vector< std::string > & | files | ||
) |
Definition at line 5063 of file Importer.cpp.
References LOG, run_benchmark_import::result, and logger::WARNING.
Referenced by import_export::Importer::gdalGetAllFilesInArchive().
|
static |
Definition at line 1986 of file Importer.cpp.
References CHECK, CHECK_LT, anonymous_namespace{Importer.cpp}::check_session_interrupted(), Geospatial::GeoTypesFactory::createOGRGeometry(), DEBUG_TIMING, logger::ERROR, measure< TimeT >::execution(), import_export::anonymous_namespace{Importer.cpp}::explode_collections_step1(), import_export::anonymous_namespace{Importer.cpp}::explode_collections_step2(), import_export::delimited_parser::find_beginning(), import_export::CopyParams::geo_explode_collections, geo_promoted_type_match(), import_export::CopyParams::geo_validate_geometry, import_export::Importer::get_column_descs(), import_export::Importer::get_copy_params(), import_export::Importer::get_import_buffers(), import_export::Importer::get_is_array(), import_export::delimited_parser::get_row(), Catalog_Namespace::SessionInfo::get_session_id(), import_export::Importer::getCatalog(), Geospatial::GeoTypesFactory::getGeoColumns(), Geospatial::GeoTypesFactory::getNullGeoColumns(), importGeoFromLonLat(), logger::INFO, IS_GEO, is_null(), ImportHelpers::is_null_datum(), kDelimitedFile, kMULTIPOINT, kPOINT, import_export::Importer::load(), import_export::ImportStatus::load_failed, import_export::ImportStatus::load_msg, LOG, import_export::CopyParams::lonlat, import_export::CopyParams::max_reject, import_export::CopyParams::null_str, shared::printContainer(), import_export::ImportStatus::rows_completed, import_export::ImportStatus::rows_rejected, import_export::Importer::set_geo_physical_import_buffer(), import_export::CopyParams::source_srid, import_export::CopyParams::source_type, sv_strip(), gpu_enabled::swap(), import_export::ImportStatus::thread_id, logger::thread_id(), to_string(), import_export::CopyParams::trim_spaces, and UNLIKELY.
Referenced by import_export::Importer::importDelimited().
|
static |
Definition at line 2338 of file Importer.cpp.
References CHECK, anonymous_namespace{Importer.cpp}::check_session_interrupted(), Geospatial::compress_coords(), DEBUG_TIMING, logger::ERROR, import_export::anonymous_namespace{Importer.cpp}::explode_collections_step1(), import_export::anonymous_namespace{Importer.cpp}::explode_collections_step2(), import_export::CopyParams::geo_explode_collections, geo_promoted_type_match(), import_export::CopyParams::geo_validate_geometry, import_export::Importer::get_column_descs(), import_export::Importer::get_copy_params(), import_export::Importer::get_import_buffers(), Catalog_Namespace::SessionInfo::get_session_id(), Geospatial::GeoTypesFactory::getGeoColumns(), Geospatial::GeoTypesFactory::getNullGeoColumns(), QueryExecutionError::hasErrorCode(), logger::INFO, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kPOLYGON, import_export::Importer::load(), import_export::ImportStatus::load_failed, import_export::ImportStatus::load_msg, LOG, import_export::CopyParams::null_str, import_export::ImportStatus::rows_completed, import_export::ImportStatus::rows_rejected, generate_TableFunctionsFactory_init::separator, import_export::ImportStatus::thread_id, logger::thread_id(), timer_start(), TIMER_STOP, to_string(), and UNLIKELY.
Referenced by import_export::Importer::importGDALGeo().
bool import_export::importGeoFromLonLat | ( | double | lon, |
double | lat, | ||
std::vector< double > & | coords, | ||
std::vector< double > & | bounds, | ||
SQLTypeInfo & | ti | ||
) |
Definition at line 1608 of file Importer.cpp.
References CHECK_EQ, Geospatial::GeoPoint::getColumns(), and SQLTypeInfo::transforms().
Referenced by import_thread_delimited().
ArrayDatum import_export::NullArray | ( | const SQLTypeInfo & | ti | ) |
Definition at line 371 of file Importer.cpp.
References append_datum(), CHECK, checked_malloc(), SQLTypeInfo::get_elem_type(), SQLTypeInfo::get_size(), NullArrayDatum(), and NullDatum().
Referenced by import_export::TypedImportBuffer::add_value(), import_export::TypedImportBuffer::add_values(), import_export::TypedImportBuffer::addDefaultValues(), import_export::ImporterUtils::composeNullArray(), and TDatumToArrayDatum().
Datum import_export::NullArrayDatum | ( | SQLTypeInfo & | ti | ) |
Definition at line 273 of file Importer.cpp.
References Datum::bigintval, Datum::boolval, Datum::doubleval, Datum::floatval, import_export::anonymous_namespace{Importer.cpp}::get_type_for_datum(), inline_fixed_encoding_null_array_val(), Datum::intval, kBIGINT, kBOOLEAN, kDATE, kDOUBLE, kFLOAT, kINT, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kPOINT, kPOLYGON, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, NULL_ARRAY_DOUBLE, NULL_ARRAY_FLOAT, Datum::smallintval, Datum::tinyintval, and run_benchmark_import::type.
Referenced by NullArray().
|
inline |
Definition at line 31 of file thread_count.h.
References g_max_import_threads.
Referenced by foreign_storage::ForeignDataWrapperFactory::createForeignTableProxy(), foreign_storage::get_num_threads(), import_export::Importer::importDelimited(), import_export::Importer::importGDALGeo(), and import_export::Importer::importGDALRaster().
MetadataColumnInfos import_export::parse_add_metadata_columns | ( | const std::string & | add_metadata_columns, |
const std::string & | file_path | ||
) |
Definition at line 35 of file MetadataColumn.cpp.
References ColumnDescriptor::columnName, ColumnDescriptor::columnType, import_export::ExpressionParser::evalAsString(), IS_INTEGER, join(), kBIGINT, kDATE, kDOUBLE, kENCODING_DICT, kFLOAT, kINT, kNULLT, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, run_benchmark_import::parser, SQLTypeInfo::set_comp_param(), SQLTypeInfo::set_compression(), SQLTypeInfo::set_fixed_size(), SQLTypeInfo::set_type(), import_export::ExpressionParser::setExpression(), import_export::ExpressionParser::setStringConstant(), ColumnDescriptor::sourceName, split(), strip(), to_lower(), and to_string().
Referenced by import_export::Importer::gdalToColumnDescriptorsGeo(), import_export::Importer::gdalToColumnDescriptorsRaster(), import_export::Importer::importGDALGeo(), import_export::Importer::importGDALRaster(), and import_export::Importer::readMetadataSampleGDAL().
std::vector< std::unique_ptr< TypedImportBuffer > > import_export::setup_column_loaders | ( | const TableDescriptor * | td, |
Loader * | loader | ||
) |
Definition at line 6202 of file Importer.cpp.
References CHECK, import_export::Loader::get_column_descs(), and import_export::Loader::getStringDict().
Referenced by DBHandler::prepare_loader_generic().
ArrayDatum import_export::StringToArray | ( | const std::string & | s, |
const SQLTypeInfo & | ti, | ||
const CopyParams & | copy_params | ||
) |
Definition at line 316 of file Importer.cpp.
References append_datum(), import_export::CopyParams::array_begin, import_export::CopyParams::array_delim, import_export::CopyParams::array_end, CHECK, checked_malloc(), SQLTypeInfo::get_elem_type(), SQLTypeInfo::get_size(), is_null(), SQLTypeInfo::is_number(), SQLTypeInfo::is_string(), SQLTypeInfo::is_time(), LOG, import_export::CopyParams::null_str, NullDatum(), StringToDatum(), trim_space(), and logger::WARNING.
Referenced by import_export::TypedImportBuffer::add_value(), and import_export::TypedImportBuffer::addDefaultValues().
ArrayDatum import_export::TDatumToArrayDatum | ( | const TDatum & | datum, |
const SQLTypeInfo & | ti | ||
) |
Definition at line 469 of file Importer.cpp.
References append_datum(), CHECK, checked_malloc(), SQLTypeInfo::get_elem_type(), SQLTypeInfo::get_size(), SQLTypeInfo::is_string(), NullArray(), and TDatumToDatum().
Referenced by import_export::TypedImportBuffer::add_value().
Datum import_export::TDatumToDatum | ( | const TDatum & | datum, |
SQLTypeInfo & | ti | ||
) |
Definition at line 422 of file Importer.cpp.
References Datum::bigintval, Datum::boolval, decimal_to_int_type(), Datum::doubleval, Datum::floatval, SQLTypeInfo::get_type(), inline_fixed_encoding_null_val(), Datum::intval, SQLTypeInfo::is_decimal(), 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 TDatumToArrayDatum().
|
static |
Definition at line 247 of file Importer.cpp.
Referenced by import_export::delimited_parser::get_row(), and StringToArray().
bool import_export::try_cast | ( | const std::string & | str | ) |
|
static |
Definition at line 167 of file Importer.cpp.
Referenced by import_export::Importer::get_import_status(), and import_export::Importer::set_import_status().
|
static |
Definition at line 34 of file CopyParams.h.
|
static |
Definition at line 170 of file Importer.cpp.
Referenced by import_export::DataStreamSink::import_compressed(), and import_export::Detector::importDelimited().
|
static |
Definition at line 37 of file CopyParams.h.
|
static |
Definition at line 163 of file Importer.cpp.
Referenced by import_export::Detector::detect_sqltype(), and import_export::Importer::gdalToColumnDescriptorsGeo().
|
static |
Definition at line 162 of file Importer.cpp.
Referenced by import_export::Detector::detect_sqltype(), and import_export::Importer::gdalToColumnDescriptorsGeo().
|
static |
Definition at line 164 of file Importer.cpp.
Referenced by import_export::Detector::detect_sqltype(), and import_export::Importer::gdalToColumnDescriptorsGeo().
|
static |
Definition at line 166 of file Importer.cpp.
Referenced by import_export::Importer::get_import_status(), and import_export::Importer::set_import_status().