Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 1.53 KB

scalar.md

File metadata and controls

33 lines (28 loc) · 1.53 KB

Scalar Types

We have concluded that all parsers require only the following scalar types:

  • Null
  • Boolean
  • Bytes
  • String (UTF-8 decoded)
  • Int64 (for precise and efficient comparisons for integers up to int64)
  • Float64 (for efficient comparisons for floats up to int64)
  • Decimals or Uint64s outside of the range of Float64 or Int64 respectively are supported as a String (TODO: What is that exact string format).
  • Times and Duration are supported via Int64 (nanoseconds since January 1, 1970 UTC) or a fallback to String (ISO 8601).

Survey

We did a survey and found that the following common scalar types, which we have mapped to the supported scalar types:

SurveyedSupported
NullNull
BoolBool
StringString
BytesBytes
Int64Int64
Float64Float64
DecimalString (TODO: What is that exact string format)
Uint64Int64 (if in range) or fallback to String (if out of int64 range, same as decimal)
DateString: yyyy-mm-dd (ISO 8601)
TimeInt64 (nanoseconds since January 1, 1970 UTC) or fallback to String (ISO 8601)
DurationInt64 (nanoseconds)
UUIDBytes (16 bytes)
EnumString (the string representation of the Enum) or fallback to Int64