Documentation
¶
Index ¶
- func ApplyCCL(ctx context.Context, path string, cclScript string) error
- func FilterWithCCL(ctx context.Context, path string, filterExpr string) (*insyra.DataTable, error)
- func Read(ctx context.Context, path string, opt ReadOptions) (*insyra.DataTable, error)
- func ReadColumn(ctx context.Context, path string, column string, opt ReadColumnOptions) (*insyra.DataList, error)
- func Stream(ctx context.Context, path string, opt ReadOptions, batchSize int) (<-chan *insyra.DataTable, <-chan error)
- func Write(dt insyra.IDataTable, path string) error
- type ColumnInfo
- type FileInfo
- type ReadColumnOptions
- type ReadOptions
- type RowGroupInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyCCL ¶
ApplyCCL applies CCL expressions directly to parquet file in streaming mode. This function operates directly on parquet files without loading into DataTable. Processing is done batch by batch to minimize memory usage. cclScript can contain multiple statements separated by semicolons.
Example: ApplyCCL(ctx, "input.parquet", "NEW('C') = ['A'] + ['B']; ['D'] = ['D'] * 2", CCLFilterOptions{})
The input file will be overwritten.
func FilterWithCCL ¶
FilterWithCCL applies a CCL filter expression to a parquet file and returns filtered results. The filter expression should evaluate to boolean for each row.
Example: FilterWithCCL(ctx, "input.parquet", "(A > 100) && (B == 'active')")
Returns a new DataTable containing only rows that satisfy the filter condition.
Will not modify the original parquet file.
func ReadColumn ¶
func ReadColumn(ctx context.Context, path string, column string, opt ReadColumnOptions) (*insyra.DataList, error)
ReadColumn: read a single column's data from Parquet file. Returns insyra.DataList.
Types ¶
type ColumnInfo ¶
type FileInfo ¶
type FileInfo struct {
NumRows int64
NumRowGroups int
Version string
CreatedBy string
Metadata map[string]string
Columns []ColumnInfo
RowGroups []RowGroupInfo
}
type ReadColumnOptions ¶
type ReadColumnOptions struct {
RowGroups []int // empty=all
MaxValues int64 // 0=no limit; if exceeded, return error to avoid RAM explosion
}
ReadColumnOptions: Only for ReadColumn (to avoid putting individual requirements into ReadOptions)
type ReadOptions ¶
ReadOptions: The options for reading Parquet files