package ops
- Alphabetic
- Public
- Protected
Type Members
- class TimeTypeApiOps extends TypeApiOps
Client-side (spark-api) operations for TimeType.
Client-side (spark-api) operations for TimeType.
This class implements all TypeApiOps methods for the TIME data type:
- String formatting: uses FractionTimeFormatter for consistent output
- Row encoding: uses LocalTimeEncoder for java.time.LocalTime
RELATIONSHIP TO TimeTypeOps: TimeTypeOps (in catalyst package) extends this class to inherit client-side operations while adding server-side operations (physical type, literals, etc.).
- Since
4.2.0
- trait TypeApiOps extends Serializable
Client-side (spark-api) type operations for the Types Framework.
Client-side (spark-api) type operations for the Types Framework.
This trait consolidates all client-side operations that a data type must implement to be usable in the Spark SQL API layer. All methods are mandatory because a type cannot function correctly without string formatting (needed for CAST to STRING, EXPLAIN, SHOW) or encoding (needed for Dataset[T] operations).
This single-interface design was chosen over separate FormatTypeOps/EncodeTypeOps traits to make it clear what a new type must implement - there is one mandatory interface, and it contains everything required. Optional capabilities (e.g., proto, Arrow, JDBC) are defined as separate traits that can be mixed in incrementally.
RELATIONSHIP TO TypeOps:
- TypeOps (catalyst): Server-side operations - physical types, literals, conversions
- TypeApiOps (spark-api): Client-side operations - formatting, encoding
The split exists because sql/api cannot depend on sql/catalyst. For TimeType, TimeTypeOps (catalyst) extends TimeTypeApiOps (sql-api) to inherit both sets of operations.
- Since
4.2.0
- See also
TimeTypeApiOps for reference implementation
Value Members
- object TypeApiOps extends Serializable
Factory object for creating TypeApiOps instances.
Factory object for creating TypeApiOps instances.
Returns Option to serve as both lookup and existence check - callers use getOrElse to fall through to legacy handling. The feature flag check is inside apply(), so callers don't need to check it separately.