OmniSciDB
a5dc49c757
|
Public Member Functions | |
void | append (const std::vector< ForeignStorageColumnBuffer > &column_buffers) override |
void | read (const ChunkKey &chunk_key, const SQLTypeInfo &sql_type, int8_t *dest, const size_t numBytes) override |
int8_t * | tryZeroCopy (const ChunkKey &chunk_key, const SQLTypeInfo &sql_type, const size_t numBytes) override |
void | dropTable (const int db_id, const int table_id) override |
void | parseArrowTable (Catalog_Namespace::Catalog *catalog, std::pair< int, int > table_key, const std::string &type, const TableDescriptor &td, const std::list< ColumnDescriptor > &cols, Data_Namespace::AbstractBufferMgr *mgr, const arrow::Table &table) |
std::shared_ptr < arrow::ChunkedArray > | createDictionaryEncodedColumn (StringDictionary *dict, const ColumnDescriptor &c, std::shared_ptr< arrow::ChunkedArray > arr_col_chunked_array) |
std::shared_ptr < arrow::ChunkedArray > | convertArrowDictionary (StringDictionary *dict, const ColumnDescriptor &c, std::shared_ptr< arrow::ChunkedArray > arr_col_chunked_array) |
template<typename T , typename ChunkType > | |
std::shared_ptr < arrow::ChunkedArray > | createDecimalColumn (const ColumnDescriptor &c, std::shared_ptr< arrow::ChunkedArray > arr_col_chunked_array) |
std::shared_ptr < arrow::ChunkedArray > | replaceNullValues (const SQLTypeInfo &columnType, std::shared_ptr< arrow::ChunkedArray > arr_col_chunked_array) |
template<typename T > | |
std::shared_ptr < arrow::ChunkedArray > | replaceNullValuesImpl (std::shared_ptr< arrow::ChunkedArray > arr_col_chunked_array) |
void | getSizeAndOffset (const Frag &frag, const std::shared_ptr< arrow::Array > &chunk, size_t i, int &size, int &offset) |
int64_t | makeFragment (const Frag &frag, ArrowFragment &arrowFrag, const std::vector< std::shared_ptr< arrow::Array >> &chunks, bool is_varlen) |
Public Member Functions inherited from PersistentForeignStorageInterface | |
virtual | ~PersistentForeignStorageInterface () |
virtual void | prepareTable (const int, const std::string &type, TableDescriptor &, std::list< ColumnDescriptor > &) |
virtual void | registerTable (Catalog_Namespace::Catalog *catalog, std::pair< int, int > table_key, const std::string &type, const TableDescriptor &td, const std::list< ColumnDescriptor > &cols, Data_Namespace::AbstractBufferMgr *mgr)=0 |
virtual std::string | getType () const =0 |
Public Attributes | |
std::map< std::array< int, 3 > , std::vector< ArrowFragment > > | m_columns |
Definition at line 50 of file ArrowForeignStorage.cpp.
|
overridevirtual |
Implements PersistentForeignStorageInterface.
Definition at line 498 of file ArrowForeignStorage.cpp.
References CHECK.
std::shared_ptr< arrow::ChunkedArray > ArrowForeignStorageBase::convertArrowDictionary | ( | StringDictionary * | dict, |
const ColumnDescriptor & | c, | ||
std::shared_ptr< arrow::ChunkedArray > | arr_col_chunked_array | ||
) |
Definition at line 687 of file ArrowForeignStorage.cpp.
References CHECK, StringDictionary::getOrAddBulk(), and run_benchmark_import::res.
Referenced by parseArrowTable().
std::shared_ptr< arrow::ChunkedArray > ArrowForeignStorageBase::createDecimalColumn | ( | const ColumnDescriptor & | c, |
std::shared_ptr< arrow::ChunkedArray > | arr_col_chunked_array | ||
) |
Definition at line 725 of file ArrowForeignStorage.cpp.
References CHECK, ColumnDescriptor::columnType, SQLTypeInfo::get_size(), threading_serial::parallel_for(), run_benchmark_import::res, and heavydb.dtypes::T.
std::shared_ptr< arrow::ChunkedArray > ArrowForeignStorageBase::createDictionaryEncodedColumn | ( | StringDictionary * | dict, |
const ColumnDescriptor & | c, | ||
std::shared_ptr< arrow::ChunkedArray > | arr_col_chunked_array | ||
) |
Definition at line 649 of file ArrowForeignStorage.cpp.
References CHECK, StringDictionary::getOrAddBulk(), threading_serial::parallel_for(), and run_benchmark_import::res.
Referenced by parseArrowTable().
|
overridevirtual |
Implements PersistentForeignStorageInterface.
Definition at line 641 of file ArrowForeignStorage.cpp.
References m_columns.
void ArrowForeignStorageBase::getSizeAndOffset | ( | const Frag & | frag, |
const std::shared_ptr< arrow::Array > & | chunk, | ||
size_t | i, | ||
int & | size, | ||
int & | offset | ||
) |
Definition at line 281 of file ArrowForeignStorage.cpp.
References Frag::first_chunk, Frag::first_chunk_offset, Frag::last_chunk, and Frag::last_chunk_size.
Referenced by makeFragment().
int64_t ArrowForeignStorageBase::makeFragment | ( | const Frag & | frag, |
ArrowFragment & | arrowFrag, | ||
const std::vector< std::shared_ptr< arrow::Array >> & | chunks, | ||
bool | is_varlen | ||
) |
Definition at line 290 of file ArrowForeignStorage.cpp.
References ArrowFragment::chunks, Frag::first_chunk, getSizeAndOffset(), Frag::last_chunk, ArrowFragment::offset, and ArrowFragment::sz.
Referenced by parseArrowTable().
void ArrowForeignStorageBase::parseArrowTable | ( | Catalog_Namespace::Catalog * | catalog, |
std::pair< int, int > | table_key, | ||
const std::string & | type, | ||
const TableDescriptor & | td, | ||
const std::list< ColumnDescriptor > & | cols, | ||
Data_Namespace::AbstractBufferMgr * | mgr, | ||
const arrow::Table & | table | ||
) |
Definition at line 355 of file ArrowForeignStorage.cpp.
References calculateFragmentsOffsets(), CHECK, convertArrowDictionary(), createDictionaryEncodedColumn(), logger::ERROR, f(), Catalog_Namespace::Catalog::getMetadataForDict(), kDECIMAL, kINT, kNUMERIC, kTEXT, LOG, m_columns, makeFragment(), TableDescriptor::maxFragRows, threading_serial::parallel_for(), replaceNullValues(), heavydb.dtypes::STRING, and DictDescriptor::stringDict.
Referenced by ArrowForeignStorage::registerTable(), and ArrowCsvForeignStorage::registerTable().
|
overridevirtual |
Implements PersistentForeignStorageInterface.
Definition at line 503 of file ArrowForeignStorage.cpp.
References CHECK, CHECK_EQ, CHECK_GE, run_benchmark_import::dest, SQLTypeInfo::get_type(), SQLTypeInfo::is_dict_encoded_string(), kTEXT, m_columns, and shared::transform().
std::shared_ptr< arrow::ChunkedArray > ArrowForeignStorageBase::replaceNullValues | ( | const SQLTypeInfo & | columnType, |
std::shared_ptr< arrow::ChunkedArray > | arr_col_chunked_array | ||
) |
Definition at line 110 of file ArrowForeignStorage.cpp.
References CHECK, SQLTypeInfo::get_size(), SQLTypeInfo::get_type(), SQLTypeInfo::is_boolean(), is_datetime(), SQLTypeInfo::is_fp(), and SQLTypeInfo::is_integer().
Referenced by parseArrowTable().
std::shared_ptr< arrow::ChunkedArray > ArrowForeignStorageBase::replaceNullValuesImpl | ( | std::shared_ptr< arrow::ChunkedArray > | arr_col_chunked_array | ) |
Definition at line 199 of file ArrowForeignStorage.cpp.
References convertBoolBitmapBufferWithNulls(), convertBoolBitmapBufferWithoutNulls(), gpu_enabled::copy(), run_benchmark_import::dest, gpu_enabled::fill(), is_null(), threading_serial::parallel_for(), and heavydb.dtypes::T.
|
overridevirtual |
Reimplemented from PersistentForeignStorageInterface.
Definition at line 585 of file ArrowForeignStorage.cpp.
References CHECK_GE, SQLTypeInfo::get_type(), SQLTypeInfo::is_dict_encoded_string(), kTEXT, and m_columns.
std::map<std::array<int, 3>, std::vector<ArrowFragment> > ArrowForeignStorageBase::m_columns |
Definition at line 107 of file ArrowForeignStorage.cpp.
Referenced by dropTable(), parseArrowTable(), read(), and tryZeroCopy().