1
0
mirror of https://github.com/cldellow/sqlite-parquet-vtable.git synced 2025-02-26 06:39:45 +00:00
sqlite-parquet-vtable/parquet/parquet_filter.cc
Colin Dellow 1f4cebe2a6 Don't use accessors
This drops the `= 'Dawson Creek'` query from 210ms to 145ms.

Maybe inlining would have been an option here? I'm not familiar enough
with g++ to know. :(
2018-03-15 23:04:11 -04:00

21 lines
446 B
C++

#include "parquet_filter.h"
Constraint::Constraint(
int column,
ConstraintOperator op,
ValueType type,
int64_t intValue,
double doubleValue,
std::vector<unsigned char> blobValue
) {
this->column = column;
this->op = op;
this->type = type;
this->intValue = intValue;
this->doubleValue = doubleValue;
this->blobValue = blobValue;
if(type == Text)
stringValue = std::string((char*)&blobValue[0], blobValue.size());
}