Documentation
¶
Overview ¶
Package spark provides a Spark SQL type provider for CEL type system integration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidSchema indicates a problem with the provided schema or database introspection. ErrInvalidSchema = errors.New("invalid schema") )
Sentinel errors for the spark package.
View Source
var NewSchema = schema.NewSchema
NewSchema creates a new Schema. This is an alias for schema.NewSchema.
Functions ¶
This section is empty.
Types ¶
type FieldSchema ¶
type FieldSchema = schema.FieldSchema
FieldSchema is an alias for schema.FieldSchema.
type TypeProvider ¶
type TypeProvider interface {
types.Provider
LoadTableSchema(ctx context.Context, tableName string) error
GetSchemas() map[string]Schema
Close()
}
TypeProvider is the Spark SQL type provider interface.
func NewTypeProvider ¶
func NewTypeProvider(schemas map[string]Schema) TypeProvider
NewTypeProvider creates a new Spark SQL type provider with pre-defined schemas.
func NewTypeProviderWithConnection ¶
NewTypeProviderWithConnection creates a new Spark SQL type provider that can introspect schemas via DESCRIBE TABLE. The caller owns the *sql.DB and is responsible for closing it. Works with any database/sql driver (e.g. gohive for Hive/SparkThrift, or a JDBC bridge).
Click to show internal directories.
Click to hide internal directories.