Documentation
¶
Overview ¶
Package golars provides an Arrow-native, lazy DataFrame API for Go.
Index ¶
- Constants
- Variables
- func RegisterObjectStore(scheme string, store ObjectStore) error
- func WriteArrow(ctx context.Context, df *DataFrame, destination string, options ...WriteOption) error
- func WriteCSV(ctx context.Context, df *DataFrame, destination string, options ...WriteOption) error
- func WriteIPCFile(ctx context.Context, df *DataFrame, destination string, options ...WriteOption) error
- func WriteIPCStream(ctx context.Context, df *DataFrame, destination string, options ...WriteOption) error
- func WriteJSON(ctx context.Context, df *DataFrame, destination string, options ...WriteOption) error
- func WriteNDJSON(ctx context.Context, df *DataFrame, destination string, options ...WriteOption) error
- func WriteParquet(ctx context.Context, df *DataFrame, destination string, options ...WriteOption) error
- func WriteParquetDataset(ctx context.Context, df *DataFrame, destination string, ...) error
- type AsOfJoinOption
- func WithAsOfAllowExact(enabled bool) AsOfJoinOption
- func WithAsOfCheckSortedness(enabled bool) AsOfJoinOption
- func WithAsOfStrategy(strategy AsOfStrategy) AsOfJoinOption
- func WithAsofAllowExact(enabled bool) AsOfJoinOption
- func WithAsofCheckSortedness(enabled bool) AsOfJoinOption
- func WithAsofStrategy(strategy AsofStrategy) AsOfJoinOption
- type AsOfStrategy
- type AsofStrategy
- type ColumnNotFoundError
- type DataFrame
- func DataFrameFromArrow(table arrow.Table) (*DataFrame, error)
- func DataFrameFromMaps(rows []map[string]any) (*DataFrame, error)
- func DataFrameFromRecordBatch(batch arrow.RecordBatch) (*DataFrame, error)
- func DataFrameFromRecordBatches(batches []arrow.RecordBatch) (*DataFrame, error)
- func DataFrameFromStructs[T any](rows []T) (*DataFrame, error)
- func NewDataFrame(columns ...*Series) (*DataFrame, error)
- func NewDataFrameFromArrow(table arrow.Table) (*DataFrame, error)
- func NewDataFrameFromMaps(rows []map[string]any) (*DataFrame, error)
- func NewDataFrameFromRecordBatch(batch arrow.RecordBatch) (*DataFrame, error)
- func NewDataFrameFromRecordBatches(batches []arrow.RecordBatch) (*DataFrame, error)
- func NewDataFrameFromStructs[T any](rows []T) (*DataFrame, error)
- func ReadArrow(ctx context.Context, path string, options ...ScanOption) (*DataFrame, error)
- func ReadCSV(ctx context.Context, path string, options ...ScanOption) (*DataFrame, error)
- func ReadCSVReader(ctx context.Context, reader io.Reader, options ...ScanOption) (*DataFrame, error)
- func ReadIPCFile(ctx context.Context, path string, options ...ScanOption) (*DataFrame, error)
- func ReadIPCStreamReader(ctx context.Context, reader io.Reader, options ...ScanOption) (*DataFrame, error)
- func ReadJSON(ctx context.Context, path string, options ...ScanOption) (*DataFrame, error)
- func ReadJSONReader(ctx context.Context, reader io.Reader, options ...ScanOption) (*DataFrame, error)
- func ReadNDJSON(ctx context.Context, path string, options ...ScanOption) (*DataFrame, error)
- func ReadNDJSONReader(ctx context.Context, reader io.Reader, options ...ScanOption) (*DataFrame, error)
- func ReadParquet(ctx context.Context, path string, options ...ScanOption) (*DataFrame, error)
- type DataType
- func DataTypeFromArrow(t arrow.DataType) DataType
- func Datetime(unit arrow.TimeUnit, timezone string) DataType
- func Decimal32(precision, scale int32) DataType
- func Decimal64(precision, scale int32) DataType
- func Decimal128(precision, scale int32) DataType
- func Decimal256(precision, scale int32) DataType
- func DictionaryOf(index, value DataType, ordered bool) DataType
- func Duration(unit arrow.TimeUnit) DataType
- func FixedSizeBinary(width int) DataType
- func FixedSizeListOf(length int32, elem DataType) DataType
- func LargeListOf(elem DataType) DataType
- func LargeListViewOf(elem DataType) DataType
- func ListOf(elem DataType) DataType
- func ListViewOf(elem DataType) DataType
- func MapOf(key, item DataType) DataType
- func RunEndEncodedOf(runEnds, values DataType) DataType
- func StructOf(fields ...Field) DataType
- func Time(unit arrow.TimeUnit) DataType
- func Time32(unit arrow.TimeUnit) DataType
- func Time64(unit arrow.TimeUnit) DataType
- func Timestamp(unit arrow.TimeUnit, timezone string) DataType
- type DatasetMode
- type DatasetWriteOption
- type DtExpr
- type Engine
- type EngineOption
- type Expr
- type Field
- type GCSStore
- type GroupBy
- type JSONDecodeOption
- type JSONErrorMode
- type JoinOption
- type JoinType
- type LazyFrame
- func Scan(path string, options ...ScanOption) *LazyFrame
- func ScanArrow(path string, options ...ScanOption) *LazyFrame
- func ScanCSV(path string, options ...ScanOption) *LazyFrame
- func ScanCSVReader(reader io.Reader, options ...ScanOption) *LazyFrame
- func ScanIPCFile(path string, options ...ScanOption) *LazyFrame
- func ScanIPCStream(path string, options ...ScanOption) *LazyFrame
- func ScanIPCStreamReader(reader io.Reader, options ...ScanOption) *LazyFrame
- func ScanJSON(path string, options ...ScanOption) *LazyFrame
- func ScanJSONReader(reader io.Reader, options ...ScanOption) *LazyFrame
- func ScanNDJSON(path string, options ...ScanOption) *LazyFrame
- func ScanNDJSONReader(reader io.Reader, options ...ScanOption) *LazyFrame
- func ScanParquet(path string, options ...ScanOption) *LazyFrame
- type LazyGroupBy
- type ListExpr
- type MemoryLimitError
- type ObjectInfo
- type ObjectStore
- type RangeObjectStore
- type RollingOption
- type Row
- type S3Store
- type ScanOption
- func WithColumns(columns ...string) ScanOption
- func WithComment(comment rune) ScanOption
- func WithDelimiter(delimiter rune) ScanOption
- func WithHasHeader(enabled bool) ScanOption
- func WithInferSchemaLength(rows int64) ScanOption
- func WithNRows(rows int64) ScanOption
- func WithNullValues(values ...string) ScanOption
- func WithQuoteChar(quote rune) ScanOption
- func WithScanBatchSize(rows int64) ScanOption
- func WithSkipRows(rows int64) ScanOption
- type Schema
- type Series
- type StrExpr
- type StructExpr
- type UnpivotOption
- type WhenThen
- type WriteOption
Constants ¶
const ( // JSONNullOnError replaces malformed or incompatible rows with null. JSONNullOnError = core.JSONNullOnError // JSONErrorOnError returns the first row-level decoding error. JSONErrorOnError = core.JSONErrorOnError )
const ( // JoinInner keeps rows with matching keys from both inputs. JoinInner = core.JoinInner // JoinLeft keeps every row from the left input. JoinLeft = core.JoinLeft // JoinFull keeps every row from both inputs. JoinFull = core.JoinFull // JoinRight keeps every row from the right input. JoinRight = core.JoinRight // JoinSemi keeps left rows with a matching right key. JoinSemi = core.JoinSemi // JoinAnti keeps left rows without a matching right key. JoinAnti = core.JoinAnti // JoinCross computes the Cartesian product. JoinCross = core.JoinCross )
const ( // AsofBackward matches the last right key less than or equal to the left key. AsofBackward = core.AsofBackward // AsofForward matches the first right key greater than or equal to the left key. AsofForward = core.AsofForward // AsofNearest matches the closest right key. AsofNearest = core.AsofNearest // AsOfBackward is an alias for AsofBackward. AsOfBackward = core.AsOfBackward // AsOfForward is an alias for AsofForward. AsOfForward = core.AsOfForward // AsOfNearest is an alias for AsofNearest. AsOfNearest = core.AsOfNearest )
const DefaultMemoryLimit int64 = core.DefaultMemoryLimit
DefaultMemoryLimit is the default per-engine memory quota in bytes.
Variables ¶
var ( // ErrClosed reports that a DataFrame, LazyFrame, Series, or Engine is closed. ErrClosed = core.ErrClosed // ErrColumnNotFound reports that an expression referenced an unknown column. ErrColumnNotFound = core.ErrColumnNotFound // ErrTypeMismatch reports an incompatible type operation. ErrTypeMismatch = core.ErrTypeMismatch // ErrInvalidPlan reports an invalid lazy or eager operation. ErrInvalidPlan = core.ErrInvalidPlan // Null is the Arrow null type. Null = core.Null // Boolean is the Arrow boolean type. Boolean = core.Boolean // Int8 is the signed 8-bit integer type. Int8 = core.Int8 // Int16 is the signed 16-bit integer type. Int16 = core.Int16 // Int32 is the signed 32-bit integer type. Int32 = core.Int32 // Int64 is the signed 64-bit integer type. Int64 = core.Int64 // Uint8 is the unsigned 8-bit integer type. Uint8 = core.Uint8 // Uint16 is the unsigned 16-bit integer type. Uint16 = core.Uint16 // Uint32 is the unsigned 32-bit integer type. Uint32 = core.Uint32 // Uint64 is the unsigned 64-bit integer type. Uint64 = core.Uint64 // UInt8 is an alias for Uint8. UInt8 = core.UInt8 // UInt16 is an alias for Uint16. UInt16 = core.UInt16 // UInt32 is an alias for Uint32. UInt32 = core.UInt32 // UInt64 is an alias for Uint64. UInt64 = core.UInt64 // Float32 is the 32-bit floating-point type. Float32 = core.Float32 // Float64 is the 64-bit floating-point type. Float64 = core.Float64 // Float16 is the 16-bit floating-point type. Float16 = core.Float16 // String is the Arrow UTF-8 string type. String = core.String // LargeString is the 64-bit-offset UTF-8 string type. LargeString = core.LargeString // Binary is the variable-width binary type. Binary = core.Binary // LargeBinary is the 64-bit-offset binary type. LargeBinary = core.LargeBinary // StringView is the Arrow string-view type. StringView = core.StringView // BinaryView is the Arrow binary-view type. BinaryView = core.BinaryView // Date32 is a date stored as days since the epoch. Date32 = core.Date32 // Date64 is a date stored as milliseconds since the epoch. Date64 = core.Date64 // Date is an alias for Date32. Date = core.Date // Utf8 is an alias for String. Utf8 = core.Utf8 // Categorical is an unordered dictionary type. Categorical = core.Categorical // Enum is an ordered dictionary type. Enum = core.Enum // IntervalMonth is a month interval type. IntervalMonth = core.IntervalMonth // IntervalDayTime is a day-time interval type. IntervalDayTime = core.IntervalDayTime // IntervalMonthDayNano is a month-day-nanosecond interval type. IntervalMonthDayNano = core.IntervalMonthDayNano )
Functions ¶
func RegisterObjectStore ¶
func RegisterObjectStore(scheme string, store ObjectStore) error
RegisterObjectStore registers a process-wide object store for a URI scheme.
func WriteArrow ¶
func WriteArrow(ctx context.Context, df *DataFrame, destination string, options ...WriteOption) error
WriteArrow writes a DataFrame as an Arrow IPC file.
func WriteIPCFile ¶
func WriteIPCFile(ctx context.Context, df *DataFrame, destination string, options ...WriteOption) error
WriteIPCFile writes a DataFrame as an Arrow IPC file.
func WriteIPCStream ¶
func WriteIPCStream(ctx context.Context, df *DataFrame, destination string, options ...WriteOption) error
WriteIPCStream writes a DataFrame as an Arrow IPC stream.
func WriteJSON ¶
func WriteJSON(ctx context.Context, df *DataFrame, destination string, options ...WriteOption) error
WriteJSON writes a DataFrame as a JSON array.
func WriteNDJSON ¶
func WriteNDJSON(ctx context.Context, df *DataFrame, destination string, options ...WriteOption) error
WriteNDJSON writes a DataFrame as newline-delimited JSON.
func WriteParquet ¶
func WriteParquet(ctx context.Context, df *DataFrame, destination string, options ...WriteOption) error
WriteParquet writes a DataFrame as Parquet.
func WriteParquetDataset ¶
func WriteParquetDataset(ctx context.Context, df *DataFrame, destination string, options ...DatasetWriteOption) error
WriteParquetDataset writes a DataFrame as a partitioned Parquet dataset.
Types ¶
type AsOfJoinOption ¶
type AsOfJoinOption = core.AsOfJoinOption
AsOfJoinOption configures an as-of join.
func WithAsOfAllowExact ¶
func WithAsOfAllowExact(enabled bool) AsOfJoinOption
WithAsOfAllowExact is an alias for WithAsofAllowExact.
func WithAsOfCheckSortedness ¶
func WithAsOfCheckSortedness(enabled bool) AsOfJoinOption
WithAsOfCheckSortedness is an alias for WithAsofCheckSortedness.
func WithAsOfStrategy ¶
func WithAsOfStrategy(strategy AsOfStrategy) AsOfJoinOption
WithAsOfStrategy is an alias for WithAsofStrategy.
func WithAsofAllowExact ¶
func WithAsofAllowExact(enabled bool) AsOfJoinOption
WithAsofAllowExact controls whether equal keys may match.
func WithAsofCheckSortedness ¶
func WithAsofCheckSortedness(enabled bool) AsOfJoinOption
WithAsofCheckSortedness asks the native engine to validate key ordering.
func WithAsofStrategy ¶
func WithAsofStrategy(strategy AsofStrategy) AsOfJoinOption
WithAsofStrategy selects an as-of matching direction.
type AsOfStrategy ¶
type AsOfStrategy = core.AsOfStrategy
AsOfStrategy is the conventional initialism spelling of AsofStrategy.
type AsofStrategy ¶
type AsofStrategy = core.AsofStrategy
AsofStrategy selects nearest-key matching direction.
type ColumnNotFoundError ¶
type ColumnNotFoundError = core.ColumnNotFoundError
ColumnNotFoundError reports an unknown column name.
type DataFrame ¶
DataFrame is an eager, immutable table.
func DataFrameFromArrow ¶
DataFrameFromArrow wraps an Arrow table as a DataFrame.
func DataFrameFromMaps ¶
DataFrameFromMaps creates an eager frame from row-oriented maps.
func DataFrameFromRecordBatch ¶
func DataFrameFromRecordBatch(batch arrow.RecordBatch) (*DataFrame, error)
DataFrameFromRecordBatch creates a DataFrame from one record batch.
func DataFrameFromRecordBatches ¶
func DataFrameFromRecordBatches(batches []arrow.RecordBatch) (*DataFrame, error)
DataFrameFromRecordBatches creates a DataFrame from schema-compatible batches.
func DataFrameFromStructs ¶
DataFrameFromStructs creates an eager frame from exported struct fields.
func NewDataFrame ¶
NewDataFrame creates an eager frame from columns.
func NewDataFrameFromArrow ¶
NewDataFrameFromArrow creates a DataFrame from an Arrow table.
func NewDataFrameFromMaps ¶
NewDataFrameFromMaps is an alias for DataFrameFromMaps.
func NewDataFrameFromRecordBatch ¶
func NewDataFrameFromRecordBatch(batch arrow.RecordBatch) (*DataFrame, error)
NewDataFrameFromRecordBatch creates a DataFrame from one record batch.
func NewDataFrameFromRecordBatches ¶
func NewDataFrameFromRecordBatches(batches []arrow.RecordBatch) (*DataFrame, error)
NewDataFrameFromRecordBatches creates a DataFrame from schema-compatible batches.
func NewDataFrameFromStructs ¶
NewDataFrameFromStructs is an alias for DataFrameFromStructs.
func ReadCSVReader ¶
func ReadCSVReader(ctx context.Context, reader io.Reader, options ...ScanOption) (*DataFrame, error)
ReadCSVReader reads CSV data from a reader into an eager DataFrame.
func ReadIPCFile ¶
ReadIPCFile reads an Arrow IPC file into an eager DataFrame.
func ReadIPCStreamReader ¶
func ReadIPCStreamReader(ctx context.Context, reader io.Reader, options ...ScanOption) (*DataFrame, error)
ReadIPCStreamReader reads an Arrow IPC stream from a reader into a DataFrame.
func ReadJSONReader ¶
func ReadJSONReader(ctx context.Context, reader io.Reader, options ...ScanOption) (*DataFrame, error)
ReadJSONReader reads a JSON array from a reader into a DataFrame.
func ReadNDJSON ¶
ReadNDJSON reads newline-delimited JSON into an eager DataFrame.
func ReadNDJSONReader ¶
func ReadNDJSONReader(ctx context.Context, reader io.Reader, options ...ScanOption) (*DataFrame, error)
ReadNDJSONReader reads newline-delimited JSON from a reader into a DataFrame.
func ReadParquet ¶
ReadParquet reads a Parquet path into an eager DataFrame.
type DataType ¶
DataType describes a column type and can be converted to Arrow.
func DataTypeFromArrow ¶
DataTypeFromArrow wraps an Arrow data type.
func Decimal128 ¶
Decimal128 creates a 128-bit decimal type.
func Decimal256 ¶
Decimal256 creates a 256-bit decimal type.
func DictionaryOf ¶
DictionaryOf creates a dictionary type.
func FixedSizeBinary ¶
FixedSizeBinary creates a fixed-width binary type.
func FixedSizeListOf ¶
FixedSizeListOf creates a fixed-length list type.
func LargeListOf ¶
LargeListOf creates a 64-bit-offset list type containing elem.
func LargeListViewOf ¶
LargeListViewOf creates a 64-bit-offset list-view type containing elem.
func ListViewOf ¶
ListViewOf creates a list-view type containing elem.
func RunEndEncodedOf ¶
RunEndEncodedOf creates a run-end encoded type.
type DatasetMode ¶
type DatasetMode = core.DatasetMode
DatasetMode selects dataset creation behavior.
const ( // DatasetCreate creates a new partitioned dataset and fails if it exists. DatasetCreate DatasetMode = core.DatasetCreate // DatasetAppend adds files to an existing partitioned dataset. DatasetAppend DatasetMode = core.DatasetAppend )
type DatasetWriteOption ¶
type DatasetWriteOption = core.DatasetWriteOption
DatasetWriteOption configures a dataset sink.
func WithDatasetMode ¶
func WithDatasetMode(mode DatasetMode) DatasetWriteOption
WithDatasetMode sets the dataset creation mode.
func WithPartitionBy ¶
func WithPartitionBy(columns ...string) DatasetWriteOption
WithPartitionBy sets dataset partition columns.
func WithRowsPerFile ¶
func WithRowsPerFile(rows int64) DatasetWriteOption
WithRowsPerFile sets the target rows per dataset file.
type Engine ¶
Engine owns shared execution configuration and object stores.
func NewEngine ¶
func NewEngine(options ...EngineOption) (*Engine, error)
NewEngine creates an execution engine with the supplied options.
type EngineOption ¶
type EngineOption = core.EngineOption
EngineOption configures an Engine.
func WithBatchSize ¶
func WithBatchSize(rows int64) EngineOption
WithBatchSize sets the preferred Arrow batch size.
func WithMemoryLimit ¶
func WithMemoryLimit(bytes int64) EngineOption
WithMemoryLimit sets the engine memory quota in bytes.
func WithObjectStore ¶
func WithObjectStore(scheme string, store ObjectStore) EngineOption
WithObjectStore adds an object store for a URI scheme to an engine.
func WithParallelism ¶
func WithParallelism(n int) EngineOption
WithParallelism sets the engine's parallelism hint.
type Expr ¶
Expr is an immutable expression tree.
func DecodeJSON ¶
func DecodeJSON(expr Expr, target any, options ...JSONDecodeOption) Expr
DecodeJSON parses a JSON string expression into a DataType or a Go struct value. Struct targets use exported fields and standard json tags.
func DecodeJSONAs ¶
func DecodeJSONAs[T any](expr Expr, options ...JSONDecodeOption) Expr
DecodeJSONAs parses JSON into the schema derived from T without a zero value.
type GCSStore ¶
GCSStore is an ObjectStore backed by Google Cloud Storage.
func NewGCSStore ¶
NewGCSStore creates a Google Cloud Storage-backed ObjectStore.
type JSONDecodeOption ¶
type JSONDecodeOption = core.JSONDecodeOption
JSONDecodeOption configures DecodeJSON.
func WithJSONCoerce ¶
func WithJSONCoerce(enabled bool) JSONDecodeOption
WithJSONCoerce enables or disables compatible JSON-to-type coercions.
func WithJSONErrorMode ¶
func WithJSONErrorMode(mode JSONErrorMode) JSONDecodeOption
WithJSONErrorMode sets the error policy for DecodeJSON.
func WithJSONStrictRequiredFields ¶
func WithJSONStrictRequiredFields(enabled bool) JSONDecodeOption
WithJSONStrictRequiredFields makes non-nullable struct fields required.
type JSONErrorMode ¶
type JSONErrorMode = core.JSONErrorMode
JSONErrorMode controls how invalid JSON rows are handled.
type JoinOption ¶
type JoinOption = core.JoinOption
JoinOption configures a join.
func WithJoinSuffix ¶
func WithJoinSuffix(suffix string) JoinOption
WithJoinSuffix sets the suffix for overlapping right-side columns.
type LazyFrame ¶
LazyFrame is a deferred logical plan.
func Scan ¶
func Scan(path string, options ...ScanOption) *LazyFrame
Scan creates a lazy scan whose format is inferred from path.
func ScanArrow ¶
func ScanArrow(path string, options ...ScanOption) *LazyFrame
ScanArrow creates a lazy Arrow IPC file scan.
func ScanCSV ¶
func ScanCSV(path string, options ...ScanOption) *LazyFrame
ScanCSV creates a lazy CSV scan.
func ScanCSVReader ¶
func ScanCSVReader(reader io.Reader, options ...ScanOption) *LazyFrame
ScanCSVReader creates a lazy CSV scan from a reader.
func ScanIPCFile ¶
func ScanIPCFile(path string, options ...ScanOption) *LazyFrame
ScanIPCFile creates a lazy Arrow IPC file scan.
func ScanIPCStream ¶
func ScanIPCStream(path string, options ...ScanOption) *LazyFrame
ScanIPCStream creates a lazy Arrow IPC stream scan.
func ScanIPCStreamReader ¶
func ScanIPCStreamReader(reader io.Reader, options ...ScanOption) *LazyFrame
ScanIPCStreamReader creates a lazy Arrow IPC stream scan from a reader.
func ScanJSON ¶
func ScanJSON(path string, options ...ScanOption) *LazyFrame
ScanJSON creates a lazy JSON array scan.
func ScanJSONReader ¶
func ScanJSONReader(reader io.Reader, options ...ScanOption) *LazyFrame
ScanJSONReader creates a lazy JSON array scan from a reader.
func ScanNDJSON ¶
func ScanNDJSON(path string, options ...ScanOption) *LazyFrame
ScanNDJSON creates a lazy newline-delimited JSON scan.
func ScanNDJSONReader ¶
func ScanNDJSONReader(reader io.Reader, options ...ScanOption) *LazyFrame
ScanNDJSONReader creates a lazy newline-delimited JSON scan from a reader.
func ScanParquet ¶
func ScanParquet(path string, options ...ScanOption) *LazyFrame
ScanParquet creates a lazy Parquet scan.
type LazyGroupBy ¶
type LazyGroupBy = core.LazyGroupBy
LazyGroupBy builds a deferred grouped aggregation.
type MemoryLimitError ¶
type MemoryLimitError = core.MemoryLimitError
MemoryLimitError reports an engine memory quota violation.
type ObjectInfo ¶
type ObjectInfo = core.ObjectInfo
ObjectInfo describes an object available from an ObjectStore.
type RangeObjectStore ¶
type RangeObjectStore = core.RangeObjectStore
RangeObjectStore supports ranged object reads.
type RollingOption ¶
type RollingOption = core.RollingOption
RollingOption configures a fixed-size rolling expression.
func WithRollingCenter ¶
func WithRollingCenter(enabled bool) RollingOption
WithRollingCenter centers a rolling window around each row.
func WithRollingMinPeriods ¶
func WithRollingMinPeriods(periods int64) RollingOption
WithRollingMinPeriods sets the minimum values required by a rolling result.
type S3Store ¶
S3Store is an ObjectStore backed by Amazon S3.
func NewS3Store ¶
NewS3Store creates an S3-backed ObjectStore.
type ScanOption ¶
type ScanOption = core.ScanOption
ScanOption configures a scan.
func WithColumns ¶
func WithColumns(columns ...string) ScanOption
WithColumns limits a scan to the named columns.
func WithComment ¶
func WithComment(comment rune) ScanOption
WithComment ignores CSV records beginning with comment.
func WithDelimiter ¶
func WithDelimiter(delimiter rune) ScanOption
WithDelimiter sets the delimiter for delimited input.
func WithHasHeader ¶
func WithHasHeader(enabled bool) ScanOption
WithHasHeader controls whether delimited input has a header row.
func WithInferSchemaLength ¶
func WithInferSchemaLength(rows int64) ScanOption
WithInferSchemaLength sets the number of CSV rows used for type inference.
func WithNRows ¶
func WithNRows(rows int64) ScanOption
WithNRows limits the number of rows read from a source.
func WithNullValues ¶
func WithNullValues(values ...string) ScanOption
WithNullValues treats supplied CSV values as null.
func WithQuoteChar ¶
func WithQuoteChar(quote rune) ScanOption
WithQuoteChar sets the CSV quote character; zero disables quoting.
func WithScanBatchSize ¶
func WithScanBatchSize(rows int64) ScanOption
WithScanBatchSize sets the preferred scan batch size.
func WithSkipRows ¶
func WithSkipRows(rows int64) ScanOption
WithSkipRows skips rows before a CSV header/data section.
type Schema ¶
Schema describes a table's fields and metadata.
func NewSchemaWithMetadata ¶
NewSchemaWithMetadata creates a schema with fields and metadata.
func SchemaFromArrow ¶
SchemaFromArrow wraps an Arrow schema.
type Series ¶
Series is a named, immutable column.
func NewSeriesFromArrow ¶
NewSeriesFromArrow creates a series from an Arrow array.
func SeriesFromArrow ¶
SeriesFromArrow wraps an Arrow array as a series.
type StructExpr ¶
type StructExpr = core.StructExpr
StructExpr provides access to fields in struct-valued expressions.
type UnpivotOption ¶
type UnpivotOption = core.UnpivotOption
UnpivotOption configures an unpivot operation.
func WithUnpivotValueName ¶
func WithUnpivotValueName(name string) UnpivotOption
WithUnpivotValueName sets the generated value column name.
func WithUnpivotVariableName ¶
func WithUnpivotVariableName(name string) UnpivotOption
WithUnpivotVariableName sets the generated variable column name.
type WriteOption ¶
type WriteOption = core.WriteOption
WriteOption configures a file sink.
func WithOverwrite ¶
func WithOverwrite(enabled bool) WriteOption
WithOverwrite controls whether an existing output is replaced.
func WithWriteBatchSize ¶
func WithWriteBatchSize(rows int64) WriteOption
WithWriteBatchSize sets the preferred sink batch size.
func WithWriteDelimiter ¶
func WithWriteDelimiter(delimiter rune) WriteOption
WithWriteDelimiter sets the delimiter for delimited output.
func WithWriteHeader ¶
func WithWriteHeader(enabled bool) WriteOption
WithWriteHeader controls whether delimited output includes a header row.