You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Diana Clarke (Jira)" <ji...@apache.org> on 2021/07/06 22:45:01 UTC
[jira] [Updated] (ARROW-13270) [JS] DataFrame Filter-Scan Count -
TypeError: df.filter is not a function
[ https://issues.apache.org/jira/browse/ARROW-13270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Diana Clarke updated ARROW-13270:
---------------------------------
Summary: [JS] DataFrame Filter-Scan Count - TypeError: df.filter is not a function (was: [JD] DataFrame Filter-Scan Count - TypeError: df.filter is not a function)
> [JS] DataFrame Filter-Scan Count - TypeError: df.filter is not a function
> -------------------------------------------------------------------------
>
> Key: ARROW-13270
> URL: https://issues.apache.org/jira/browse/ARROW-13270
> Project: Apache Arrow
> Issue Type: Bug
> Components: JavaScript
> Reporter: Diana Clarke
> Priority: Major
>
> The following benchmark fails with {{TypeError: df.filter is not a function}}.
> {code}
> b.suite(
> `DataFrame Filter-Scan Count`,
> ...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 () => filteredDf.count();
> }
> )),
> b.cycle(cycle)
> );
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)