<commit_before>import {
    DataTypeFieldConfig, DataTypeFields, DataTypeVersion, Maybe
} from '@terascope/types';
import { Vector, VectorType } from '../vector';

/**
 * Column options
 */
export interface ColumnOptions {
    name: string;
    version?: DataTypeVersion;
    config: DataTypeFieldConfig;
}

/**
 * A mode to describe which value to pass when iterating over a Vector
*/
export enum VectorIteratorMode {
    /**
     * Just the values from Vector, automatically deals with ListVectors and skips nulls.
     * This is probably the most common.
     *
     * @todo This will be called with only unique values.
    */
    EACH_VALUE,

    /**
     * A values from the Vector
    */
    EACH,

    /**
     * The entire Vector be passed
    */
    ALL,
}

/**
 * A created transformation function
*/
export type ColumnTransformFn<
    T,
    R = T,
> = {
    mode: VectorIteratorMode.EACH,
    fn: (value: Maybe<T|Vector<T>>) => Maybe<R|Vector<R>>;
}|{
    mode: VectorIteratorMode.EACH_VALUE,
    skipNulls?: false,<commit_msg>Fix previous commit (forgot an unsaved file)<commit_after>import {
    DataTypeFieldConfig, DataTypeFields, DataTypeVersion, Maybe
} from '@terascope/types';
import { Vector, VectorIteratorMode, VectorType } from '../vector';

/**
 * Column options
 */
export interface ColumnOptions {
    name: string;
    version?: DataTypeVersion;
    config: DataTypeFieldConfig;
}

/**
 * A created transformation function
*/
export type ColumnTransformFn<
    T,
    R = T,
> = {
    mode: VectorIteratorMode.EACH,
    fn: (value: Maybe<T|Vector<T>>) => Maybe<R|Vector<R>>;
}|{
    mode: VectorIteratorMode.EACH_VALUE,
    skipNulls?: false,
{'fraction_non_alphanumeric': 0.118562874251497, 'fraction_numerical': 0.0, 'mean_word_length': 3.2627551020408165, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3302808', 'n_tokens_mistral': 509, 'n_tokens_neox': 505, 'n_words': 148}