1
0
mirror of https://github.com/cldellow/sqlite-parquet-vtable.git synced 2025-09-16 22:49:59 +00:00

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. :(
This commit is contained in:
Colin Dellow
2018-03-15 23:04:11 -04:00
parent 8ba13f44d5
commit 1f4cebe2a6
3 changed files with 22 additions and 59 deletions

View File

@@ -31,16 +31,6 @@ enum ValueType {
};
class Constraint {
int column; // underlying column in the query
ConstraintOperator op;
ValueType type;
int64_t intValue;
double doubleValue;
std::vector<unsigned char> blobValue;
// Only set when blobValue is set
std::string stringValue;
public:
// Kind of a messy constructor function, but it's just for internal use, so whatever.
Constraint(
@@ -52,13 +42,15 @@ public:
std::vector<unsigned char> blobValue
);
int getColumn();
ConstraintOperator getOperator();
ValueType getType();
int64_t getInt();
double getDouble();
const std::vector<unsigned char>& getBytes();
const std::string& getString();
int column; // underlying column in the query
ConstraintOperator op;
ValueType type;
int64_t intValue;
double doubleValue;
std::vector<unsigned char> blobValue;
// Only set when blobValue is set
std::string stringValue;
};
#endif