-
Kamil Mielnik authored
* Rename query to legacyQuery * Use step.query * Port ExpressionStep to MLv2 * Use named export for ExpressionStep * Move setup to the top of the file * Add expressions parameter to createQueryWithClauses * Update ExpressionStep unit tests * Add a test for adding expressions * Format code * Add typing for openSteps and remove default parameter to prevent accidental omission * Rename arguments * Remove NotebookStep['update'] and update NotebookStepUiComponentProps['updateQuery'] * Remove NotebookStep['update'] from test util * Add metadata argument to NotebookStepFn * Remove unused NotebookStep['clean'] * Change previewQuery type to Query * Update NotebookStep['revert'] to work with MLv2 only * Use revert: null properly * Clear breakouts before aggregations * Update NotebookStepDef['active'] to work with MLv2 only * Update NotebookStepDef['valid'], remove NotebookStepFn * Remove TODO * Update STEP.valid calls * Port #36507 to master * Migrate STEP.valid * Format code * Rename topLevelQuery to query and stagedQuery to legacyQuery * Use INotebookStep["id"], simplify handleQueryChange * Use database from metadata instead of question * Format code * Apply expressions before aggregations * Improve typing in tests * Fix expression name uniqueness * Fix Lib.fields typing * Use dropStageIfEmpty when removing expressions * Fix unique name computation * Port hasData * Add stageIndex argument to NotebookStepDef['valid'] * Port query.isSourceQuery() * Add junit.xml to .gitignore - see https://github.com/metabase/metabase/pull/35929 * Make unit tests run * Improve revert typing * Update unit tests * Update unit tests * Update unit tests * Rename filterStep1 to filterStep and filterStep2 to postAggregationFilterStep * Update unit tests * Update unit tests * Update unit tests * Update unit tests * Convert unit tests to TS * Simplify getQuestionStepsForMBQLQuery * Refactor tests * Remove test for new queries - a Lib.Query object cannot exist without the "data step" * Lift database to reuse it * Port getQuestionSteps * Skip e2e test for metabase#19745 due to metabase#36574 - See https://github.com/metabase/metabase/issues/36574 - See https://metaboat.slack.com/archives/C04CYTEL9N2/p1702063378269379 - See https://metaboat.slack.com/archives/C0643FZ5E83/p1702365832126429?thread_ts=1702362649.548849&cid=C0643FZ5E83 * Update comment * Revert type change * Revert "Use dropStageIfEmpty when removing expressions" This reverts commit d529503e793c93ecdc006f0ecf20c874f8cd091b. * Format code * Skip 19745 tests * Format code * Use dropStageIfEmpty instead of cleanNesting * Try to drop only the updated stage * Use stageIndex instead of -1 in preview3 * Format code * Ignore question.isStructured() check * Finish migrating getQuestionSteps * Migrate query.clean in Notebook to MLv2 * Use reduceRight instead of reverse + reduce * Fix typo * Move hasBreakouts computation until after the redundant stage is removed * Update e2e sandboxing test to assert showing permissions error instead of magically dropping an unsupported join - @see https://metaboat.slack.com/archives/C01LQQ2UW03/p1704294434403599 --------- Co-authored-by:
Tamás Benkő <tamas@metabase.com> Co-authored-by:
Alexander Polyankin <alexander.polyankin@metabase.com>
Kamil Mielnik authored* Rename query to legacyQuery * Use step.query * Port ExpressionStep to MLv2 * Use named export for ExpressionStep * Move setup to the top of the file * Add expressions parameter to createQueryWithClauses * Update ExpressionStep unit tests * Add a test for adding expressions * Format code * Add typing for openSteps and remove default parameter to prevent accidental omission * Rename arguments * Remove NotebookStep['update'] and update NotebookStepUiComponentProps['updateQuery'] * Remove NotebookStep['update'] from test util * Add metadata argument to NotebookStepFn * Remove unused NotebookStep['clean'] * Change previewQuery type to Query * Update NotebookStep['revert'] to work with MLv2 only * Use revert: null properly * Clear breakouts before aggregations * Update NotebookStepDef['active'] to work with MLv2 only * Update NotebookStepDef['valid'], remove NotebookStepFn * Remove TODO * Update STEP.valid calls * Port #36507 to master * Migrate STEP.valid * Format code * Rename topLevelQuery to query and stagedQuery to legacyQuery * Use INotebookStep["id"], simplify handleQueryChange * Use database from metadata instead of question * Format code * Apply expressions before aggregations * Improve typing in tests * Fix expression name uniqueness * Fix Lib.fields typing * Use dropStageIfEmpty when removing expressions * Fix unique name computation * Port hasData * Add stageIndex argument to NotebookStepDef['valid'] * Port query.isSourceQuery() * Add junit.xml to .gitignore - see https://github.com/metabase/metabase/pull/35929 * Make unit tests run * Improve revert typing * Update unit tests * Update unit tests * Update unit tests * Rename filterStep1 to filterStep and filterStep2 to postAggregationFilterStep * Update unit tests * Update unit tests * Update unit tests * Update unit tests * Convert unit tests to TS * Simplify getQuestionStepsForMBQLQuery * Refactor tests * Remove test for new queries - a Lib.Query object cannot exist without the "data step" * Lift database to reuse it * Port getQuestionSteps * Skip e2e test for metabase#19745 due to metabase#36574 - See https://github.com/metabase/metabase/issues/36574 - See https://metaboat.slack.com/archives/C04CYTEL9N2/p1702063378269379 - See https://metaboat.slack.com/archives/C0643FZ5E83/p1702365832126429?thread_ts=1702362649.548849&cid=C0643FZ5E83 * Update comment * Revert type change * Revert "Use dropStageIfEmpty when removing expressions" This reverts commit d529503e793c93ecdc006f0ecf20c874f8cd091b. * Format code * Skip 19745 tests * Format code * Use dropStageIfEmpty instead of cleanNesting * Try to drop only the updated stage * Use stageIndex instead of -1 in preview3 * Format code * Ignore question.isStructured() check * Finish migrating getQuestionSteps * Migrate query.clean in Notebook to MLv2 * Use reduceRight instead of reverse + reduce * Fix typo * Move hasBreakouts computation until after the redundant stage is removed * Update e2e sandboxing test to assert showing permissions error instead of magically dropping an unsupported join - @see https://metaboat.slack.com/archives/C01LQQ2UW03/p1704294434403599 --------- Co-authored-by:
Tamás Benkő <tamas@metabase.com> Co-authored-by:
Alexander Polyankin <alexander.polyankin@metabase.com>
Loading