Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JS] DataFrame Filter-Iterate - TypeError: df.filter is not a function #28953

Closed
asfimport opened this issue Jul 6, 2021 · 2 comments
Closed

Comments

@asfimport
Copy link

The following benchmark fails with TypeError: df.filter is not a function.

    b.suite(
        `DataFrame Filter-Iterate`,

        ...counts.map(({ column, test, value }: {column: string; test: 'gt' | 'eq'; value: number | string}) => b.add(
            `dataset: ${name}, column: ${column}, length: ${formatNumber(df.length)}, type: ${df.schema.fields.find((c)=> c.name === column)!.type}, test: ${test}, value: ${value}`,
            () => {
                let filteredDf: Arrow.FilteredDataFrame;
                if (test == 'gt') {
                    filteredDf = df.filter(col(column).gt(value));
                } else if (test == 'eq') {
                    filteredDf = df.filter(col(column).eq(value));
                } else {
                    throw new Error(`Unrecognized test "${test}"`);
                }

                return () => {
                    for (const _value of filteredDf) {}
                };
            }
        )),

        b.cycle(cycle)
    );

Reporter: Diana Clarke / @dianaclarke
Assignee: Diana Clarke / @dianaclarke

Note: This issue was originally created as ARROW-13272. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Diana Clarke / @dianaclarke:
Fixed in ARROW-13275

@asfimport
Copy link
Author

Todd Farmer / @toddfarmer:
Transitioning issue from Resolved to Closed to based on resolution field value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant