-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The current implementation does not allow filtering columns. On top of this, generated columns aren't working either, as the passed function can't be serialized for passing to a worker. To solve both issues, the following interface should be implemented:
type OriginalColumn = {
/**
* References a detected column.
*/
index: number,
/**
* May override name.
*/
name?: string,
/**
* May override data type.
*/
type?: DataType,
/**
* Map values to same type. This may be used as a simpler alternative to
* generated columns, e.g. for scaling or offsetting of values.
*/
map?: (v: any) => any
}
type GeneratedColumn = {
name: string,
type: DataType,
/**
* In order to be passed to workers, this has to be a string.
* The function must be of type (line: string[]) => any.
*/
func: string,
/**
* Allow sharing a state between func invocations, as well as passing data
* to func. Note that this has to be fully serializable.
*/
state: Object // func.bind(state), can be used to pass state
}
type Column = OriginalColumn | GeneratedColumn;Metadata
Metadata
Assignees
Labels
No labels