OmniSciDB
a5dc49c757
|
#include "ArrowForeignStorage.h"
#include <arrow/api.h>
#include <arrow/csv/reader.h>
#include <arrow/io/file.h>
#include <arrow/util/decimal.h>
#include <tbb/parallel_for.h>
#include <tbb/task_group.h>
#include <array>
#include <future>
#include <vector>
#include "Catalog/DataframeTableDescriptor.h"
#include "DataMgr/ForeignStorage/ForeignStorageInterface.h"
#include "DataMgr/StringNoneEncoder.h"
#include "Logger/Logger.h"
#include "QueryEngine/ArrowResultSet.h"
#include "Shared/ArrowUtil.h"
#include "Shared/measure.h"
Go to the source code of this file.
Classes | |
struct | Frag |
struct | ArrowFragment |
class | ArrowForeignStorageBase |
class | ArrowForeignStorage |
class | ArrowCsvForeignStorage |
Functions | |
void | convertBoolBitmapBufferWithNulls (int8_t *dst, const uint8_t *src, const uint8_t *bitmap, int64_t length, int8_t null_value) |
void | convertBoolBitmapBufferWithoutNulls (int8_t *dst, const uint8_t *src, int64_t length) |
template<typename V , std::enable_if_t<!std::is_same_v< V, bool > &&std::is_integral< V >::value, int > = 0> | |
V | get_null_value () |
template<typename V , std::enable_if_t< std::is_same_v< V, bool >, int > = 0> | |
int8_t | get_null_value () |
std::vector< Frag > | calculateFragmentsOffsets (const arrow::ChunkedArray &array, size_t maxFragRows) |
static SQLTypeInfo | getOmnisciType (const arrow::DataType &type) |
void | setArrowTable (std::string name, std::shared_ptr< arrow::Table > table) |
void | releaseArrowTable (std::string name) |
void | registerArrowForeignStorage (std::shared_ptr< ForeignStorageInterface > fsi) |
static std::shared_ptr < arrow::DataType > | getArrowImportType (const SQLTypeInfo type) |
void | registerArrowCsvForeignStorage (std::shared_ptr< ForeignStorageInterface > fsi) |
std::vector<Frag> calculateFragmentsOffsets | ( | const arrow::ChunkedArray & | array, |
size_t | maxFragRows | ||
) |
Definition at line 320 of file ArrowForeignStorage.cpp.
Referenced by ArrowForeignStorageBase::parseArrowTable().
void convertBoolBitmapBufferWithNulls | ( | int8_t * | dst, |
const uint8_t * | src, | ||
const uint8_t * | bitmap, | ||
int64_t | length, | ||
int8_t | null_value | ||
) |
Definition at line 142 of file ArrowForeignStorage.cpp.
References run_benchmark_import::dest, and is_null().
Referenced by ArrowForeignStorageBase::replaceNullValuesImpl().
void convertBoolBitmapBufferWithoutNulls | ( | int8_t * | dst, |
const uint8_t * | src, | ||
int64_t | length | ||
) |
Definition at line 165 of file ArrowForeignStorage.cpp.
References run_benchmark_import::dest.
Referenced by ArrowForeignStorageBase::replaceNullValuesImpl().
|
inline |
Definition at line 184 of file ArrowForeignStorage.cpp.
Referenced by initializeFlatBuffer().
|
inline |
Definition at line 189 of file ArrowForeignStorage.cpp.
|
static |
Definition at line 924 of file ArrowForeignStorage.cpp.
References CHECK, SQLTypeInfo::get_precision(), SQLTypeInfo::get_scale(), SQLTypeInfo::get_size(), SQLTypeInfo::get_type(), SQLTypeInfo::get_type_name(), IS_INTEGER, kARRAY, kBOOLEAN, kCHAR, kDATE, kDECIMAL, kDOUBLE, kFLOAT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kNUMERIC, kTEXT, kTIME, kTIMESTAMP, kVARCHAR, and to_string().
Referenced by ArrowCsvForeignStorage::registerTable().
|
static |
Definition at line 793 of file ArrowForeignStorage.cpp.
References kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kDOUBLE, kENCODING_DICT, kFLOAT, kINT, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, heavydb.dtypes::STRING, and run_benchmark_import::type.
Referenced by ArrowForeignStorage::prepareTable().
void registerArrowCsvForeignStorage | ( | std::shared_ptr< ForeignStorageInterface > | fsi | ) |
Definition at line 1063 of file ArrowForeignStorage.cpp.
Referenced by PersistentStorageMgr::PersistentStorageMgr().
void registerArrowForeignStorage | ( | std::shared_ptr< ForeignStorageInterface > | fsi | ) |
Definition at line 893 of file ArrowForeignStorage.cpp.
Referenced by PersistentStorageMgr::PersistentStorageMgr().
void releaseArrowTable | ( | std::string | name | ) |
Definition at line 889 of file ArrowForeignStorage.cpp.
References ArrowForeignStorage::tables.
Referenced by EmbeddedDatabase::DBEngineImpl::importArrowTable().
void setArrowTable | ( | std::string | name, |
std::shared_ptr< arrow::Table > | table | ||
) |
Definition at line 885 of file ArrowForeignStorage.cpp.
References setup::name, and ArrowForeignStorage::tables.
Referenced by EmbeddedDatabase::DBEngineImpl::importArrowTable().