Add support for UInt64 (#70)
Closes GH-54
diff --git a/src/afs.cc b/src/afs.cc
index fc44d94..8e5e1f5 100644
--- a/src/afs.cc
+++ b/src/afs.cc
@@ -773,6 +773,12 @@
return arrow::Status::OK();
}
+ arrow::Status Visit(const arrow::UInt64Type& type)
+ {
+ oid_ = INT8OID;
+ return arrow::Status::OK();
+ }
+
private:
Oid oid_;
};
@@ -826,6 +832,12 @@
return arrow::Status::OK();
}
+ arrow::Status Visit(const arrow::UInt64Array& array)
+ {
+ datum_ = UInt64GetDatum(array.Value(i_row_));
+ return arrow::Status::OK();
+ }
+
private:
int64_t i_row_;
Datum& datum_;
diff --git a/test/test-flight-sql.rb b/test/test-flight-sql.rb
index dcc5735..caf68c2 100644
--- a/test/test-flight-sql.rb
+++ b/test/test-flight-sql.rb
@@ -87,7 +87,8 @@
data("int64", ["bigint", Arrow::Int64Array, [1, -2, 3]])
data("uint8", ["smallint", Arrow::UInt8Array, [1, 2, 3]])
data("uint16", ["smallint", Arrow::UInt16Array, [1, 2, 3]])
- data("uint32", ["smallint", Arrow::UInt32Array, [1, 2, 3]])
+ data("uint32", ["integer", Arrow::UInt32Array, [1, 2, 3]])
+ data("uint64", ["bigint", Arrow::UInt64Array, [1, 2, 3]])
def test_insert_type
unless flight_sql_client.respond_to?(:prepare)
omit("red-arrow-flight-sql 14.0.0 or later is required")