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

Issue with FILTER_GROUP (RangeError: Maximum call stack size exceeded) #9173

Open
itestyoy opened this issue Feb 2, 2025 · 2 comments
Open
Assignees
Labels
question The issue is a question. Please use Stack Overflow for questions.

Comments

@itestyoy
Copy link

itestyoy commented Feb 2, 2025

Hi! When we use FILTER_GROUP in measures, we get a RangeError: Maximum call stack size exceeded.

Model:

 cube(`test`, {
        sql: `select 1 as value, '1' as name`,

        measures: {
            metric: {
                sql: `value`,
                type: `avg`,
                filters: [
                    { sql: `${CUBE}.name = ${FILTER_GROUP(FILTER_PARAMS.test.name.filter((kpi) => kpi))}` }
                ],
            },
        },

        dimensions: {
            name: {
                sql: `name`,
                type: `string`
            },
            value: {
                sql: `value`,
                type: `number`
            }
        },
    });

Query:

{
  "dimensions": [
    "test.name",
    "test.value"
  ],
  "measures": [
    "test.metric"
  ],
  "filters": [
    {
      "values": [
        "1"
      ],
      "member": "test.name",
      "operator": "equals"
    }
  ]
}

Without FILTER_GROUP with FILTER_PARAMS... AND FILTER_PARAMS... .... works fine.

@igorlukanin
Copy link
Member

Which version of Cube are you using? Is it the latest?

@igorlukanin igorlukanin self-assigned this Feb 3, 2025
@igorlukanin igorlukanin added the question The issue is a question. Please use Stack Overflow for questions. label Feb 3, 2025
@itestyoy
Copy link
Author

itestyoy commented Feb 3, 2025

@igorlukanin Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question The issue is a question. Please use Stack Overflow for questions.
Projects
None yet
Development

No branches or pull requests

2 participants