21 namespace foreign_storage {
38 template <
typename V,
typename T,
typename NullType = V>
44 const parquet::ColumnDescriptor* parquet_column_descriptor)
47 parquet_column_descriptor) {}
50 const size_t omnisci_data_type_byte_size,
51 const size_t parquet_data_type_byte_size)
53 omnisci_data_type_byte_size,
54 parquet_data_type_byte_size) {}
57 int8_t* omnisci_data_bytes)
override {
58 const auto& parquet_data_value =
reinterpret_cast<const T*
>(parquet_data_bytes)[0];
59 auto& omnisci_data_value =
reinterpret_cast<V*
>(omnisci_data_bytes)[0];
60 omnisci_data_value = parquet_data_value;
71 const auto& parquet_data_value =
reinterpret_cast<const T*
>(parquet_data)[j];
80 std::enable_if_t<(!std::is_integral<TT>::value || std::is_same<TT, bool>::value) &&
81 !std::is_floating_point<TT>::value,
89 template <typename TT = T, std::enable_if_t<std::is_floating_point<TT>::value,
int> = 0>
92 if (column_type.
is_fp()) {
101 std::enable_if_t<std::is_integral<TT>::value && !std::is_same<TT, bool>::value,
109 }
else if (column_type.
is_date()) {
117 !column_type.
is_fp()) {
120 auto [unencoded_stats_min, unencoded_stats_max] =
144 template <
typename V,
typename T,
typename U,
typename NullType = V>
152 const parquet::ColumnDescriptor* parquet_column_descriptor)
155 parquet_column_descriptor) {}
158 const size_t omnisci_data_type_byte_size,
159 const size_t parquet_data_type_byte_size)
161 omnisci_data_type_byte_size,
162 parquet_data_type_byte_size) {}
165 int8_t* omnisci_data_bytes)
override {
166 const auto& parquet_data_value =
reinterpret_cast<const T*
>(parquet_data_bytes)[0];
167 auto& omnisci_data_value =
reinterpret_cast<V*
>(omnisci_data_bytes)[0];
168 omnisci_data_value =
static_cast<U
>(parquet_data_value);
176 auto [unencoded_stats_min, unencoded_stats_max] =
187 const auto& parquet_data_value =
reinterpret_cast<const T*
>(parquet_data)[j];
void validateIntegralOrFloatingPointValue(const T &value, const SQLTypeInfo &column_type) const
bool is_timestamp() const
static void validateValue(const D &data_value, const SQLTypeInfo &column_type)
static void validateValue(const D &data_value, const SQLTypeInfo &column_type)
void validateIntegralOrFloatingPointMetadata(std::shared_ptr< parquet::Statistics > stats, const SQLTypeInfo &column_type) const
void encodeAndCopy(const int8_t *parquet_data_bytes, int8_t *omnisci_data_bytes) override
void validate(std::shared_ptr< parquet::Statistics > stats, const SQLTypeInfo &column_type) const override
void encodeAndCopy(const int8_t *parquet_data_bytes, int8_t *omnisci_data_bytes) override
ParquetFixedLengthEncoder(Data_Namespace::AbstractBuffer *buffer, const size_t omnisci_data_type_byte_size, const size_t parquet_data_type_byte_size)
ParquetUnsignedFixedLengthEncoder(Data_Namespace::AbstractBuffer *buffer, const size_t omnisci_data_type_byte_size, const size_t parquet_data_type_byte_size)
An AbstractBuffer is a unit of data management for a data manager.
specifies the content in-memory of a row in the column metadata table
std::pair< T, T > getUnencodedStats(std::shared_ptr< parquet::Statistics > stats) const
void validate(const int8_t *parquet_data, const int64_t j, const SQLTypeInfo &column_type) const override
ParquetFixedLengthEncoder(Data_Namespace::AbstractBuffer *buffer, const ColumnDescriptor *column_desciptor, const parquet::ColumnDescriptor *parquet_column_descriptor)
void validate(std::shared_ptr< parquet::Statistics > stats, const SQLTypeInfo &column_type) const override
void validate(const int8_t *parquet_data, const int64_t j, const SQLTypeInfo &column_type) const override
static void validateValue(const D &data_value, const SQLTypeInfo &column_type)
ParquetUnsignedFixedLengthEncoder(Data_Namespace::AbstractBuffer *buffer, const ColumnDescriptor *column_desciptor, const parquet::ColumnDescriptor *parquet_column_descriptor)
bool encodingIsIdentityForSameTypes() const override
static void validateValue(const D &data_value, const SQLTypeInfo &column_type)