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

Maximum call stack size exceeded #8707

Open
itestyoy opened this issue Sep 13, 2024 · 3 comments
Open

Maximum call stack size exceeded #8707

itestyoy opened this issue Sep 13, 2024 · 3 comments
Labels
question The issue is a question. Please use Stack Overflow for questions.

Comments

@itestyoy
Copy link

itestyoy commented Sep 13, 2024

After updating from v.0.35.78 to v.0.36.0, we started getting errors like this:

It is probably somehow related to FILTER_PARAMS.

cube  | RangeError: Maximum call stack size exceeded

cube  |     at CubeEvaluator.resolveSymbol (/cube/node_modules/@cubejs-backend/schema-compiler/src/compiler/CubeSymbols.js:506:43)
cube  |     at /cube/node_modules/@cubejs-backend/schema-compiler/src/adapter/BaseQuery.js:2357:23
cube  |     at /cube/node_modules/@cubejs-backend/schema-compiler/src/compiler/CubeSymbols.js:455:71
cube  |     at Array.map (<anonymous>)
cube  |     at CubeEvaluator.resolveSymbolsCall (/cube/node_modules/@cubejs-backend/schema-compiler/src/compiler/CubeSymbols.js:455:59)
cube  |     at BigqueryQuery.evaluateSql (/cube/node_modules/@cubejs-backend/schema-compiler/src/adapter/BaseQuery.js:2354:26)
cube  |     at BigqueryQuery.evaluateSymbolSql (/cube/node_modules/@cubejs-backend/schema-compiler/src/adapter/BaseQuery.js:2248:36)
cube  |     at BigqueryQuery.traverseSymbol (/cube/node_modules/@cubejs-backend/schema-compiler/src/adapter/BaseQuery.js:1851:35)
cube  |     at /cube/node_modules/@cubejs-backend/schema-compiler/src/adapter/BaseQuery.js:1902:31
cube  |     at BigqueryQuery.evaluateSymbolSqlWithContext (/cube/node_modules/@cubejs-backend/schema-compiler/src/adapter/BaseQuery.js:2468:22)
cube  |     at BigqueryQuery.collectMemberNamesFor (/cube/node_modules/@cubejs-backend/schema-compiler/src/adapter/BaseQuery.js:2418:10)
cube  |     at /cube/node_modules/@cubejs-backend/schema-compiler/src/adapter/BaseQuery.js:1902:17
cube  |     at CompilerCache.cache (/cube/node_modules/@cubejs-backend/schema-compiler/src/adapter/QueryCache.js:22:28)
cube  |     at /cube/node_modules/@cubejs-backend/schema-compiler/src/adapter/BaseQuery.js:1898:39
cube  |     at _map (/cube/node_modules/@cubejs-backend/schema-compiler/node_modules/ramda/src/internal/_map.js:7:19)
cube  |     at map (/cube/node_modules/@cubejs-backend/schema-compiler/node_modules/ramda/src/map.js:83:14)
cube  |     at /cube/node_modules/@cubejs-backend/schema-compiler/node_modules/ramda/src/internal/_dispatchable.js:50:15
cube  |     at /cube/node_modules/@cubejs-backend/schema-compiler/node_modules/ramda/src/internal/_curry2.js:26:18
cube  |     at f1 (/cube/node_modules/@cubejs-backend/schema-compiler/node_modules/ramda/src/internal/_curry1.js:19:17)
cube  |     at /cube/node_modules/@cubejs-backend/schema-compiler/node_modules/ramda/src/internal/_pipe.js:3:14
cube  |     at /cube/node_modules/@cubejs-backend/schema-compiler/node_modules/ramda/src/internal/_pipe.js:3:27
cube  |     at /cube/node_modules/@cubejs-backend/schema-compiler/node_modules/ramda/src/internal/_pipe.js:3:27
@paveltiunov
Copy link
Member

@itestyoy Could you please share your data model?

@paveltiunov paveltiunov added the question The issue is a question. Please use Stack Overflow for questions. label Sep 14, 2024
@itestyoy
Copy link
Author

Hi @paveltiunov!

This is not a real use case, it's only for demonstration. Our use case of using FILTER_PARAMS in dimensions involves working with arrays with adding pseudo-columns like is_day_used.

First version with this error v0.35.80.

We really hope that you fix it because this use case is essential for us, and Cube doesn't provide any other options to work with arrays.

cube('model', {
    public: false,
    title: 'model',
    sql: `select 1 as metric, 1 as day`,

    dimensions: {
        is_day_used: {
            type: `boolean`,
            sql: `(true)`,
        },

        day: {
            sql: `day`,
            type: 'number'
        },

        test: {
            sql: `(${FILTER_PARAMS.model[`is_day_used`].filter(x => `day = 1`)})`,
            type: `boolean`,
        }
    },

    measures: {
        metric: {
            sql: `metric`,
            type: `sum`
        }
    },
});

@itestyoy
Copy link
Author

Hi! @paveltiunov Is there any update?

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