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

float support

This commit is contained in:
Colin Dellow
2018-03-03 20:57:09 -05:00
parent 18f07f4c43
commit 67b0d96967
3 changed files with 12 additions and 10 deletions

View File

@@ -86,6 +86,17 @@ void ParquetCursor::ensureColumn(int col) {
}
break;
}
case parquet::Type::FLOAT:
{
parquet::FloatScanner* s = (parquet::FloatScanner*)scanners[col].get();
float rv = 0;
if(s->NextValue(&rv, &wasNull)) {
colDoubleValues[col] = rv;
} else {
throw std::invalid_argument("unexpectedly lacking a next value");
}
break;
}
case parquet::Type::DOUBLE:
{
parquet::DoubleScanner* s = (parquet::DoubleScanner*)scanners[col].get();
@@ -157,7 +168,6 @@ void ParquetCursor::ensureColumn(int col) {
}
break;
}
case parquet::Type::FLOAT:
case parquet::Type::FIXED_LEN_BYTE_ARRAY:
default:
// Should be impossible to get here as we should have forbidden this at