lib/fluent/plugin/bigquery/schema.rb in fluent-plugin-bigquery-2.1.0 vs lib/fluent/plugin/bigquery/schema.rb in fluent-plugin-bigquery-2.2.0
- old
+ new
@@ -84,10 +84,20 @@
def format_one(value)
value.to_f
end
end
+ class NumericFieldSchema < FieldSchema
+ def type
+ :numeric
+ end
+
+ def format_one(value)
+ value.to_s
+ end
+ end
+
class BooleanFieldSchema < FieldSchema
def type
:boolean
end
@@ -167,9 +177,10 @@
class RecordSchema < FieldSchema
FIELD_TYPES = {
string: StringFieldSchema,
integer: IntegerFieldSchema,
float: FloatFieldSchema,
+ numeric: NumericFieldSchema,
boolean: BooleanFieldSchema,
timestamp: TimestampFieldSchema,
date: DateFieldSchema,
datetime: DateTimeFieldSchema,
time: TimeFieldSchema,