@finos/legend-query-builder 0.6.22 → 0.6.24
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +8 -5
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.js +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.js +3 -3
- package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +8 -3
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +2 -2
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderTextEditor.js +4 -3
- package/lib/components/QueryBuilderTextEditor.js.map +1 -1
- package/lib/components/QueryBuilder_TestID.d.ts +1 -1
- package/lib/components/QueryBuilder_TestID.d.ts.map +1 -1
- package/lib/components/QueryBuilder_TestID.js +1 -1
- package/lib/components/QueryBuilder_TestID.js.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js +8 -7
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +5 -5
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js +3 -3
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js.map +1 -1
- package/lib/components/fetch-structure/{QueryBuilderOLAPGroupByPanel.d.ts → QueryBuilderTDSWindowPanel.d.ts} +4 -4
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts.map +1 -0
- package/lib/components/fetch-structure/{QueryBuilderOLAPGroupByPanel.js → QueryBuilderTDSWindowPanel.js} +94 -94
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -0
- package/lib/components/shared/LambdaParameterValuesEditor.d.ts.map +1 -1
- package/lib/components/shared/LambdaParameterValuesEditor.js +10 -4
- package/lib/components/shared/LambdaParameterValuesEditor.js.map +1 -1
- package/lib/components/shared/QueryBuilderVariableSelector.js +1 -1
- package/lib/components/shared/QueryBuilderVariableSelector.js.map +1 -1
- package/lib/components/workflows/ClassQueryBuilder.js +1 -1
- package/lib/components/workflows/ClassQueryBuilder.js.map +1 -1
- package/lib/components/workflows/MappingQueryBuilder.js +1 -1
- package/lib/components/workflows/MappingQueryBuilder.js.map +1 -1
- package/lib/graphManager/QueryBuilderHashUtils.d.ts +14 -14
- package/lib/graphManager/QueryBuilderHashUtils.d.ts.map +1 -1
- package/lib/graphManager/QueryBuilderHashUtils.js +14 -14
- package/lib/graphManager/QueryBuilderHashUtils.js.map +1 -1
- package/lib/graphManager/QueryBuilderSupportedFunctions.d.ts +1 -0
- package/lib/graphManager/QueryBuilderSupportedFunctions.d.ts.map +1 -1
- package/lib/graphManager/QueryBuilderSupportedFunctions.js +1 -0
- package/lib/graphManager/QueryBuilderSupportedFunctions.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +6 -6
- package/lib/stores/QueryBuilderPreviewDataHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderPreviewDataHelper.js +6 -2
- package/lib/stores/QueryBuilderPreviewDataHelper.js.map +1 -1
- package/lib/stores/QueryBuilderResultState.d.ts +3 -1
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +4 -1
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.js +1 -1
- package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js +26 -9
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts +7 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js +50 -32
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +6 -6
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +13 -13
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js +2 -2
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +4 -4
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.d.ts → window/QueryBuilderWindowGroupByOperatorLoader.d.ts} +3 -3
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowGroupByOperatorLoader.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowGroupByOperatorLoader.js +36 -0
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowGroupByOperatorLoader.js.map +1 -0
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowState.d.ts +91 -0
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByState.js → window/QueryBuilderWindowState.js} +55 -53
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowState.js.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.d.ts → window/QueryBuilderWindowStateBuilder.d.ts} +1 -1
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.js → window/QueryBuilderWindowStateBuilder.js} +10 -10
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.d.ts → window/QueryBuilderWindowValueSpecificationBuilder.d.ts} +3 -3
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.js → window/QueryBuilderWindowValueSpecificationBuilder.js} +5 -5
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator.d.ts → window/operators/QueryBuilderTDS_WindowOperator.d.ts} +2 -2
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator.js → window/operators/QueryBuilderTDS_WindowOperator.js} +2 -2
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator.js.map +1 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Average.d.ts +25 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Average.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Average.js → window/operators/QueryBuilderTDS_WindowOperator_Average.js} +6 -4
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Average.js.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Max.d.ts → window/operators/QueryBuilderTDS_WindowOperator_Count.d.ts} +3 -3
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Count.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Count.js → window/operators/QueryBuilderTDS_WindowOperator_Count.js} +4 -4
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Count.js.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Min.d.ts → window/operators/QueryBuilderTDS_WindowOperator_Max.d.ts} +3 -3
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Max.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Max.js → window/operators/QueryBuilderTDS_WindowOperator_Max.js} +4 -4
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Max.js.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Average.d.ts → window/operators/QueryBuilderTDS_WindowOperator_Min.d.ts} +3 -3
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Min.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Min.js → window/operators/QueryBuilderTDS_WindowOperator_Min.js} +4 -4
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Min.js.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Count.d.ts → window/operators/QueryBuilderTDS_WindowOperator_Sum.d.ts} +3 -3
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Sum.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Sum.js → window/operators/QueryBuilderTDS_WindowOperator_Sum.js} +4 -4
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Sum.js.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_RowNumber.d.ts → window/operators/QueryBuilderTDS_WindowRankOperator_AverageRank.d.ts} +3 -3
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_AverageRank.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_AverageRank.js → window/operators/QueryBuilderTDS_WindowRankOperator_AverageRank.js} +4 -4
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_AverageRank.js.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_AverageRank.d.ts → window/operators/QueryBuilderTDS_WindowRankOperator_DenseRank.d.ts} +3 -3
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_DenseRank.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_DenseRank.js → window/operators/QueryBuilderTDS_WindowRankOperator_DenseRank.js} +4 -4
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_DenseRank.js.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_DenseRank.d.ts → window/operators/QueryBuilderTDS_WindowRankOperator_Rank.d.ts} +3 -3
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_Rank.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_Rank.js → window/operators/QueryBuilderTDS_WindowRankOperator_Rank.js} +4 -4
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_Rank.js.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_Rank.d.ts → window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.d.ts} +3 -3
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_RowNumber.js → window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.js} +4 -4
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.js.map +1 -0
- package/lib/stores/shared/LambdaParameterState.d.ts +1 -1
- package/lib/stores/shared/LambdaParameterState.d.ts.map +1 -1
- package/lib/stores/shared/LambdaParameterState.js +1 -1
- package/lib/stores/shared/LambdaParameterState.js.map +1 -1
- package/package.json +13 -13
- package/src/components/QueryBuilder.tsx +16 -6
- package/src/components/QueryBuilderConstantExpressionPanel.tsx +1 -1
- package/src/components/QueryBuilderParametersPanel.tsx +3 -4
- package/src/components/QueryBuilderResultPanel.tsx +17 -3
- package/src/components/QueryBuilderSideBar.tsx +2 -2
- package/src/components/QueryBuilderTextEditor.tsx +10 -2
- package/src/components/QueryBuilder_TestID.ts +1 -1
- package/src/components/explorer/QueryBuilderExplorerPanel.tsx +12 -1
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +8 -8
- package/src/components/fetch-structure/QueryBuilderPostTDSPanel.tsx +6 -8
- package/src/components/fetch-structure/{QueryBuilderOLAPGroupByPanel.tsx → QueryBuilderTDSWindowPanel.tsx} +166 -166
- package/src/components/shared/LambdaParameterValuesEditor.tsx +24 -11
- package/src/components/shared/QueryBuilderVariableSelector.tsx +1 -1
- package/src/components/workflows/ClassQueryBuilder.tsx +1 -1
- package/src/components/workflows/MappingQueryBuilder.tsx +1 -1
- package/src/graphManager/QueryBuilderHashUtils.ts +14 -14
- package/src/graphManager/QueryBuilderSupportedFunctions.ts +1 -0
- package/src/stores/QueryBuilderPreviewDataHelper.ts +6 -2
- package/src/stores/QueryBuilderResultState.ts +7 -1
- package/src/stores/QueryBuilderStateBuilder.ts +1 -1
- package/src/stores/QueryBuilderValueSpecificationBuilder.ts +42 -10
- package/src/stores/QueryBuilderValueSpecificationBuilderHelper.ts +79 -34
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +16 -16
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts +2 -2
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +4 -2
- package/src/stores/fetch-structure/tds/window/QueryBuilderWindowGroupByOperatorLoader.ts +39 -0
- package/src/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByState.ts → window/QueryBuilderWindowState.ts} +83 -76
- package/src/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.ts → window/QueryBuilderWindowStateBuilder.ts} +19 -19
- package/src/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.ts → window/QueryBuilderWindowValueSpecificationBuilder.ts} +9 -9
- package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator.ts → window/operators/QueryBuilderTDS_WindowOperator.ts} +1 -1
- package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Average.ts → window/operators/QueryBuilderTDS_WindowOperator_Average.ts} +5 -3
- package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Count.ts → window/operators/QueryBuilderTDS_WindowOperator_Count.ts} +3 -3
- package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Max.ts → window/operators/QueryBuilderTDS_WindowOperator_Max.ts} +3 -3
- package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Min.ts → window/operators/QueryBuilderTDS_WindowOperator_Min.ts} +3 -3
- package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Sum.ts → window/operators/QueryBuilderTDS_WindowOperator_Sum.ts} +3 -3
- package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_AverageRank.ts → window/operators/QueryBuilderTDS_WindowRankOperator_AverageRank.ts} +3 -3
- package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_DenseRank.ts → window/operators/QueryBuilderTDS_WindowRankOperator_DenseRank.ts} +3 -3
- package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_Rank.ts → window/operators/QueryBuilderTDS_WindowRankOperator_Rank.ts} +3 -3
- package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_RowNumber.ts → window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.ts} +3 -3
- package/src/stores/shared/LambdaParameterState.ts +2 -1
- package/tsconfig.json +15 -15
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel.d.ts.map +0 -1
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.js +0 -36
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.d.ts +0 -91
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Average.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Average.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Count.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Count.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Max.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Max.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Min.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Min.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Sum.d.ts +0 -25
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Sum.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Sum.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_AverageRank.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_AverageRank.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_DenseRank.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_DenseRank.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_Rank.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_Rank.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_RowNumber.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_RowNumber.js.map +0 -1
- package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.ts +0 -39
@@ -30,19 +30,19 @@ import type { QueryBuilderProjectionColumnDragSource } from '../projection/Query
|
|
30
30
|
import { QueryBuilderTDSColumnState } from '../QueryBuilderTDSColumnState.js';
|
31
31
|
import type { QueryBuilderTDSState } from '../QueryBuilderTDSState.js';
|
32
32
|
import type { COLUMN_SORT_TYPE } from '../QueryResultSetModifierState.js';
|
33
|
-
import type {
|
33
|
+
import type { QueryBuilderTDS_WindowOperator } from './operators/QueryBuilderTDS_WindowOperator.js';
|
34
34
|
|
35
|
-
export const
|
35
|
+
export const QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE = 'WINDOW_COLUMN';
|
36
36
|
|
37
|
-
export interface
|
37
|
+
export interface QueryBuilderWindowColumnDragSource {
|
38
38
|
columnState: QueryBuilderTDSColumnState;
|
39
39
|
}
|
40
40
|
|
41
|
-
export type
|
41
|
+
export type QueryBuilderWindowDropTarget =
|
42
42
|
| QueryBuilderProjectionColumnDragSource
|
43
|
-
|
|
43
|
+
| QueryBuilderWindowColumnDragSource;
|
44
44
|
|
45
|
-
export class
|
45
|
+
export class WindowGroupByColumnSortByState implements Hashable {
|
46
46
|
columnState: QueryBuilderTDSColumnState;
|
47
47
|
sortType: COLUMN_SORT_TYPE;
|
48
48
|
|
@@ -71,23 +71,23 @@ export class OLAPGroupByColumnSortByState implements Hashable {
|
|
71
71
|
|
72
72
|
get hashCode(): string {
|
73
73
|
return hashArray([
|
74
|
-
QUERY_BUILDER_HASH_STRUCTURE.
|
74
|
+
QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_COLUMN_SORTBY_STATE,
|
75
75
|
this.sortType,
|
76
76
|
this.columnState.columnName,
|
77
77
|
]);
|
78
78
|
}
|
79
79
|
}
|
80
80
|
|
81
|
-
export abstract class
|
82
|
-
readonly
|
81
|
+
export abstract class QueryBuilderTDS_WindowOperatorState implements Hashable {
|
82
|
+
readonly windowState: QueryBuilderWindowState;
|
83
83
|
lambdaParameterName: string = DEFAULT_LAMBDA_VARIABLE_NAME;
|
84
|
-
operator:
|
84
|
+
operator: QueryBuilderTDS_WindowOperator;
|
85
85
|
|
86
86
|
constructor(
|
87
|
-
|
88
|
-
operator:
|
87
|
+
windowState: QueryBuilderWindowState,
|
88
|
+
operator: QueryBuilderTDS_WindowOperator,
|
89
89
|
) {
|
90
|
-
this.
|
90
|
+
this.windowState = windowState;
|
91
91
|
this.operator = operator;
|
92
92
|
}
|
93
93
|
|
@@ -95,39 +95,39 @@ export abstract class QueryBuilderTDS_OLAPOperatorState implements Hashable {
|
|
95
95
|
this.lambdaParameterName = paramName;
|
96
96
|
}
|
97
97
|
|
98
|
-
setOperator(val:
|
98
|
+
setOperator(val: QueryBuilderTDS_WindowOperator): void {
|
99
99
|
this.operator = val;
|
100
100
|
}
|
101
101
|
|
102
102
|
get hashCode(): string {
|
103
103
|
return hashArray([
|
104
|
-
QUERY_BUILDER_HASH_STRUCTURE.
|
104
|
+
QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_GROUPBY_OPERATION_STATE,
|
105
105
|
this.lambdaParameterName,
|
106
106
|
this.operator,
|
107
107
|
]);
|
108
108
|
}
|
109
109
|
}
|
110
110
|
|
111
|
-
export class
|
111
|
+
export class QueryBuilderTDS_WindowRankOperatorState extends QueryBuilderTDS_WindowOperatorState {
|
112
112
|
constructor(
|
113
|
-
|
114
|
-
operator:
|
113
|
+
windowState: QueryBuilderWindowState,
|
114
|
+
operator: QueryBuilderTDS_WindowOperator,
|
115
115
|
) {
|
116
|
-
super(
|
116
|
+
super(windowState, operator);
|
117
117
|
makeObservable(this, {
|
118
118
|
setLambdaParameterName: action,
|
119
119
|
});
|
120
120
|
}
|
121
121
|
}
|
122
122
|
|
123
|
-
export class
|
123
|
+
export class QueryBuilderTDS_WindowAggreationOperatorState extends QueryBuilderTDS_WindowOperatorState {
|
124
124
|
columnState: QueryBuilderTDSColumnState;
|
125
125
|
constructor(
|
126
|
-
|
127
|
-
operator:
|
126
|
+
windowState: QueryBuilderWindowState,
|
127
|
+
operator: QueryBuilderTDS_WindowOperator,
|
128
128
|
columnState: QueryBuilderTDSColumnState,
|
129
129
|
) {
|
130
|
-
super(
|
130
|
+
super(windowState, operator);
|
131
131
|
makeObservable(this, {
|
132
132
|
columnState: observable,
|
133
133
|
setColumnState: action,
|
@@ -142,7 +142,7 @@ export class QueryBuilderTDS_OLAPAggreationOperatorState extends QueryBuilderTDS
|
|
142
142
|
|
143
143
|
override get hashCode(): string {
|
144
144
|
return hashArray([
|
145
|
-
QUERY_BUILDER_HASH_STRUCTURE.
|
145
|
+
QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_GROUPBY_AGG_OPERATION_STATE,
|
146
146
|
this.lambdaParameterName,
|
147
147
|
this.operator,
|
148
148
|
this.columnState.columnName,
|
@@ -150,21 +150,21 @@ export class QueryBuilderTDS_OLAPAggreationOperatorState extends QueryBuilderTDS
|
|
150
150
|
}
|
151
151
|
}
|
152
152
|
|
153
|
-
export class
|
153
|
+
export class QueryBuilderWindowColumnState
|
154
154
|
extends QueryBuilderTDSColumnState
|
155
155
|
implements Hashable
|
156
156
|
{
|
157
|
-
readonly
|
157
|
+
readonly windowState: QueryBuilderWindowState;
|
158
158
|
windowColumns: QueryBuilderTDSColumnState[] = [];
|
159
|
-
sortByState:
|
160
|
-
operationState:
|
159
|
+
sortByState: WindowGroupByColumnSortByState | undefined;
|
160
|
+
operationState: QueryBuilderTDS_WindowOperatorState;
|
161
161
|
columnName: string;
|
162
162
|
|
163
163
|
constructor(
|
164
|
-
|
164
|
+
windowState: QueryBuilderWindowState,
|
165
165
|
windowColumns: QueryBuilderTDSColumnState[],
|
166
|
-
sortType:
|
167
|
-
operationState:
|
166
|
+
sortType: WindowGroupByColumnSortByState | undefined,
|
167
|
+
operationState: QueryBuilderTDS_WindowOperatorState,
|
168
168
|
columnName: string,
|
169
169
|
) {
|
170
170
|
super();
|
@@ -182,29 +182,32 @@ export class QueryBuilderOLAPGroupByColumnState
|
|
182
182
|
changeOperator: action,
|
183
183
|
changeSortBy: action,
|
184
184
|
});
|
185
|
-
this.
|
185
|
+
this.windowState = windowState;
|
186
186
|
this.windowColumns = windowColumns;
|
187
187
|
this.sortByState = sortType;
|
188
188
|
this.operationState = operationState;
|
189
189
|
this.columnName = columnName;
|
190
190
|
}
|
191
191
|
|
192
|
-
get
|
193
|
-
return this.
|
192
|
+
get columnWindowGroupIdx(): number {
|
193
|
+
return this.windowState.windowColumns.findIndex((e) => e === this);
|
194
194
|
}
|
195
195
|
|
196
196
|
get possibleReferencedColumns(): QueryBuilderTDSColumnState[] {
|
197
|
-
// column can only reference TDS columns already defined, i.e in an earlier index of the
|
198
|
-
const idx = this.
|
197
|
+
// column can only reference TDS columns already defined, i.e in an earlier index of the window columns
|
198
|
+
const idx = this.windowState.tdsState.tdsColumns.findIndex(
|
199
|
+
(e) => e === this,
|
200
|
+
);
|
199
201
|
if (idx === -1) {
|
200
|
-
return this.
|
202
|
+
return this.windowState.tdsState.tdsColumns;
|
201
203
|
}
|
202
|
-
return this.
|
204
|
+
return this.windowState.tdsState.tdsColumns.slice(0, idx);
|
203
205
|
}
|
204
206
|
|
205
207
|
get referencedTDSColumns(): QueryBuilderTDSColumnState[] {
|
206
208
|
const operatorReference =
|
207
|
-
this.operationState instanceof
|
209
|
+
this.operationState instanceof
|
210
|
+
QueryBuilderTDS_WindowAggreationOperatorState
|
208
211
|
? [this.operationState.columnState]
|
209
212
|
: [];
|
210
213
|
const soryByReference = this.sortByState
|
@@ -215,7 +218,7 @@ export class QueryBuilderOLAPGroupByColumnState
|
|
215
218
|
|
216
219
|
getColumnType(): Type | undefined {
|
217
220
|
return this.operationState.operator.getOperatorReturnType(
|
218
|
-
this.
|
221
|
+
this.windowState.tdsState.queryBuilderState.graphManagerState.graph,
|
219
222
|
);
|
220
223
|
}
|
221
224
|
|
@@ -223,11 +226,11 @@ export class QueryBuilderOLAPGroupByColumnState
|
|
223
226
|
this.columnName = val;
|
224
227
|
}
|
225
228
|
|
226
|
-
setOperatorState(op:
|
229
|
+
setOperatorState(op: QueryBuilderTDS_WindowOperatorState): void {
|
227
230
|
this.operationState = op;
|
228
231
|
}
|
229
232
|
|
230
|
-
setSortBy(val:
|
233
|
+
setSortBy(val: WindowGroupByColumnSortByState | undefined): void {
|
231
234
|
this.sortByState = val;
|
232
235
|
}
|
233
236
|
|
@@ -244,7 +247,7 @@ export class QueryBuilderOLAPGroupByColumnState
|
|
244
247
|
}
|
245
248
|
|
246
249
|
possibleAggregatedColumns(
|
247
|
-
op:
|
250
|
+
op: QueryBuilderTDS_WindowOperator,
|
248
251
|
): QueryBuilderTDSColumnState[] {
|
249
252
|
if (op.isColumnAggregator()) {
|
250
253
|
return this.possibleReferencedColumns.filter((col) =>
|
@@ -254,31 +257,35 @@ export class QueryBuilderOLAPGroupByColumnState
|
|
254
257
|
return [];
|
255
258
|
}
|
256
259
|
|
257
|
-
changeOperator(
|
260
|
+
changeOperator(windowOp: QueryBuilderTDS_WindowOperator): void {
|
258
261
|
const currentOperator = this.operationState.operator;
|
259
262
|
const currentAggregateColumn =
|
260
|
-
this.operationState instanceof
|
263
|
+
this.operationState instanceof
|
264
|
+
QueryBuilderTDS_WindowAggreationOperatorState
|
261
265
|
? this.operationState.columnState
|
262
266
|
: undefined;
|
263
|
-
if (currentOperator !==
|
264
|
-
if (
|
267
|
+
if (currentOperator !== windowOp) {
|
268
|
+
if (windowOp.isColumnAggregator()) {
|
265
269
|
const compatibleAggCol =
|
266
270
|
currentAggregateColumn &&
|
267
|
-
|
271
|
+
windowOp.isCompatibleWithColumn(currentAggregateColumn)
|
268
272
|
? currentAggregateColumn
|
269
|
-
: this.possibleAggregatedColumns(
|
273
|
+
: this.possibleAggregatedColumns(windowOp)[0];
|
270
274
|
if (compatibleAggCol) {
|
271
275
|
this.setOperatorState(
|
272
|
-
new
|
273
|
-
this.
|
274
|
-
|
276
|
+
new QueryBuilderTDS_WindowAggreationOperatorState(
|
277
|
+
this.windowState,
|
278
|
+
windowOp,
|
275
279
|
compatibleAggCol,
|
276
280
|
),
|
277
281
|
);
|
278
282
|
}
|
279
283
|
} else {
|
280
284
|
this.setOperatorState(
|
281
|
-
new
|
285
|
+
new QueryBuilderTDS_WindowRankOperatorState(
|
286
|
+
this.windowState,
|
287
|
+
windowOp,
|
288
|
+
),
|
282
289
|
);
|
283
290
|
}
|
284
291
|
}
|
@@ -290,7 +297,7 @@ export class QueryBuilderOLAPGroupByColumnState
|
|
290
297
|
if (sortOp) {
|
291
298
|
const sortInfoOpState =
|
292
299
|
sortByState ??
|
293
|
-
new
|
300
|
+
new WindowGroupByColumnSortByState(
|
294
301
|
guaranteeNonNullable(this.possibleReferencedColumns[0]),
|
295
302
|
sortOp,
|
296
303
|
);
|
@@ -304,7 +311,7 @@ export class QueryBuilderOLAPGroupByColumnState
|
|
304
311
|
|
305
312
|
get hashCode(): string {
|
306
313
|
return hashArray([
|
307
|
-
QUERY_BUILDER_HASH_STRUCTURE.
|
314
|
+
QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_COLUMN_STATE,
|
308
315
|
hashArray(this.windowColumns),
|
309
316
|
this.sortByState ?? '',
|
310
317
|
this.operationState,
|
@@ -313,20 +320,20 @@ export class QueryBuilderOLAPGroupByColumnState
|
|
313
320
|
}
|
314
321
|
}
|
315
322
|
|
316
|
-
export class
|
323
|
+
export class QueryBuilderWindowState implements Hashable {
|
317
324
|
readonly tdsState: QueryBuilderTDSState;
|
318
|
-
|
319
|
-
operators:
|
320
|
-
editColumn:
|
325
|
+
windowColumns: QueryBuilderWindowColumnState[] = [];
|
326
|
+
operators: QueryBuilderTDS_WindowOperator[];
|
327
|
+
editColumn: QueryBuilderWindowColumnState | undefined;
|
321
328
|
|
322
329
|
constructor(
|
323
330
|
tdsState: QueryBuilderTDSState,
|
324
|
-
operators:
|
331
|
+
operators: QueryBuilderTDS_WindowOperator[],
|
325
332
|
) {
|
326
333
|
makeObservable(this, {
|
327
|
-
|
334
|
+
windowColumns: observable,
|
328
335
|
editColumn: observable,
|
329
|
-
|
336
|
+
addWindowColumn: action,
|
330
337
|
removeColumn: action,
|
331
338
|
moveColumn: action,
|
332
339
|
setEditColumn: action,
|
@@ -336,42 +343,42 @@ export class QueryBuilderOLAPGroupByState implements Hashable {
|
|
336
343
|
}
|
337
344
|
|
338
345
|
get isEmpty(): boolean {
|
339
|
-
return !this.
|
346
|
+
return !this.windowColumns.length;
|
340
347
|
}
|
341
348
|
|
342
349
|
get referencedTDSColumns(): QueryBuilderTDSColumnState[] {
|
343
|
-
return uniq(this.
|
350
|
+
return uniq(this.windowColumns.map((c) => c.referencedTDSColumns).flat());
|
344
351
|
}
|
345
352
|
|
346
|
-
setEditColumn(col:
|
353
|
+
setEditColumn(col: QueryBuilderWindowColumnState | undefined): void {
|
347
354
|
this.editColumn = col;
|
348
355
|
}
|
349
356
|
|
350
|
-
findOperator(func: string):
|
357
|
+
findOperator(func: string): QueryBuilderTDS_WindowOperator | undefined {
|
351
358
|
return this.operators.find((o) => matchFunctionName(func, o.pureFunc));
|
352
359
|
}
|
353
360
|
|
354
|
-
|
355
|
-
addUniqueEntry(this.
|
361
|
+
addWindowColumn(windowCol: QueryBuilderWindowColumnState): void {
|
362
|
+
addUniqueEntry(this.windowColumns, windowCol);
|
356
363
|
}
|
357
364
|
|
358
|
-
removeColumn(column:
|
359
|
-
deleteEntry(this.
|
365
|
+
removeColumn(column: QueryBuilderWindowColumnState): void {
|
366
|
+
deleteEntry(this.windowColumns, column);
|
360
367
|
}
|
361
368
|
|
362
369
|
moveColumn(fromIndex: number, toIndex: number): void {
|
363
|
-
const fromCol = this.
|
364
|
-
const toCol = this.
|
370
|
+
const fromCol = this.windowColumns[fromIndex];
|
371
|
+
const toCol = this.windowColumns[toIndex];
|
365
372
|
if (fromCol && toCol) {
|
366
|
-
this.
|
367
|
-
this.
|
373
|
+
this.windowColumns[fromIndex] = toCol;
|
374
|
+
this.windowColumns[toIndex] = fromCol;
|
368
375
|
}
|
369
376
|
}
|
370
377
|
|
371
378
|
get hashCode(): string {
|
372
379
|
return hashArray([
|
373
|
-
QUERY_BUILDER_HASH_STRUCTURE.
|
374
|
-
hashArray(this.
|
380
|
+
QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_GROUPBY_STATE,
|
381
|
+
hashArray(this.windowColumns),
|
375
382
|
]);
|
376
383
|
}
|
377
384
|
}
|
@@ -39,12 +39,12 @@ import {
|
|
39
39
|
} from '../QueryBuilderTDSHelper.js';
|
40
40
|
import { QueryBuilderTDSState } from '../QueryBuilderTDSState.js';
|
41
41
|
import {
|
42
|
-
type
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
} from './
|
42
|
+
type QueryBuilderTDS_WindowOperatorState,
|
43
|
+
WindowGroupByColumnSortByState,
|
44
|
+
QueryBuilderWindowColumnState,
|
45
|
+
QueryBuilderTDS_WindowAggreationOperatorState,
|
46
|
+
QueryBuilderTDS_WindowRankOperatorState,
|
47
|
+
} from './QueryBuilderWindowState.js';
|
48
48
|
|
49
49
|
export const processTDS_OLAPGroupByExpression = (
|
50
50
|
expression: SimpleFunctionExpression,
|
@@ -118,7 +118,7 @@ export const processTDS_OLAPGroupByExpression = (
|
|
118
118
|
});
|
119
119
|
|
120
120
|
// process sortBy
|
121
|
-
let sortByState:
|
121
|
+
let sortByState: WindowGroupByColumnSortByState | undefined;
|
122
122
|
if (containsSortByExpression) {
|
123
123
|
const sortByExpression = guaranteeType(
|
124
124
|
sortByValueSpec,
|
@@ -136,10 +136,10 @@ export const processTDS_OLAPGroupByExpression = (
|
|
136
136
|
'Can`t process OLAP sort column: OLAP sort column should be a string primitive instance value',
|
137
137
|
);
|
138
138
|
const sortColState = getTDSColumnState(tdsState, colSortVal);
|
139
|
-
sortByState = new
|
139
|
+
sortByState = new WindowGroupByColumnSortByState(sortColState, colSortType);
|
140
140
|
}
|
141
141
|
// process olap operation
|
142
|
-
let operatorState:
|
142
|
+
let operatorState: QueryBuilderTDS_WindowOperatorState;
|
143
143
|
if (olapOperationExpression instanceof SimpleFunctionExpression) {
|
144
144
|
assertTrue(
|
145
145
|
matchFunctionName(olapOperationExpression.functionName, [
|
@@ -171,11 +171,11 @@ export const processTDS_OLAPGroupByExpression = (
|
|
171
171
|
SimpleFunctionExpression,
|
172
172
|
);
|
173
173
|
const operation = guaranteeNonNullable(
|
174
|
-
tdsState.
|
174
|
+
tdsState.windowState.findOperator(operationFunctionExp.functionName),
|
175
175
|
`olapGroupBy() operator '${operationFunctionExp.functionName}' not supported`,
|
176
176
|
);
|
177
|
-
operatorState = new
|
178
|
-
tdsState.
|
177
|
+
operatorState = new QueryBuilderTDS_WindowAggreationOperatorState(
|
178
|
+
tdsState.windowState,
|
179
179
|
operation,
|
180
180
|
oppColumnState,
|
181
181
|
);
|
@@ -198,15 +198,15 @@ export const processTDS_OLAPGroupByExpression = (
|
|
198
198
|
SimpleFunctionExpression,
|
199
199
|
);
|
200
200
|
const operation = guaranteeNonNullable(
|
201
|
-
tdsState.
|
201
|
+
tdsState.windowState.findOperator(operationFunctionExp.functionName),
|
202
202
|
`olapGroupBy() operator '${operationFunctionExp.functionName}' not supported`,
|
203
203
|
);
|
204
204
|
assertTrue(
|
205
205
|
!operation.isColumnAggregator(),
|
206
206
|
`Operator '${operation.getLabel()}' expects a TDS column to aggregate against`,
|
207
207
|
);
|
208
|
-
operatorState = new
|
209
|
-
tdsState.
|
208
|
+
operatorState = new QueryBuilderTDS_WindowRankOperatorState(
|
209
|
+
tdsState.windowState,
|
210
210
|
operation,
|
211
211
|
);
|
212
212
|
operatorState.setLambdaParameterName(
|
@@ -227,13 +227,13 @@ export const processTDS_OLAPGroupByExpression = (
|
|
227
227
|
).values[0],
|
228
228
|
'Can`t process OLAP column: OLAP column should be a string primitive instance value',
|
229
229
|
);
|
230
|
-
const olapGroupByColumnState = new
|
231
|
-
tdsState.
|
230
|
+
const olapGroupByColumnState = new QueryBuilderWindowColumnState(
|
231
|
+
tdsState.windowState,
|
232
232
|
windowColumns,
|
233
233
|
sortByState,
|
234
234
|
operatorState,
|
235
235
|
olapColumnValue,
|
236
236
|
);
|
237
|
-
tdsState.
|
238
|
-
tdsState.
|
237
|
+
tdsState.windowState.addWindowColumn(olapGroupByColumnState);
|
238
|
+
tdsState.setShowWindowFuncPanel(true);
|
239
239
|
};
|
@@ -31,17 +31,17 @@ import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../graphManager/Quer
|
|
31
31
|
import { buildGenericLambdaFunctionInstanceValue } from '../../../QueryBuilderValueSpecificationHelper.js';
|
32
32
|
import { getFunctionNameFromTDSSortColumn } from '../QueryBuilderTDSHelper.js';
|
33
33
|
import {
|
34
|
-
type
|
35
|
-
type
|
36
|
-
|
37
|
-
} from './
|
34
|
+
type QueryBuilderWindowColumnState,
|
35
|
+
type QueryBuilderWindowState,
|
36
|
+
QueryBuilderTDS_WindowAggreationOperatorState,
|
37
|
+
} from './QueryBuilderWindowState.js';
|
38
38
|
|
39
39
|
const appendOLAPGroupByColumnState = (
|
40
|
-
olapGroupByColumnState:
|
40
|
+
olapGroupByColumnState: QueryBuilderWindowColumnState,
|
41
41
|
lambda: LambdaFunction,
|
42
42
|
): LambdaFunction => {
|
43
43
|
const graph =
|
44
|
-
olapGroupByColumnState.
|
44
|
+
olapGroupByColumnState.windowState.tdsState.queryBuilderState
|
45
45
|
.graphManagerState.graph;
|
46
46
|
|
47
47
|
// create window cols expression
|
@@ -92,7 +92,7 @@ const appendOLAPGroupByColumnState = (
|
|
92
92
|
graph,
|
93
93
|
);
|
94
94
|
let olapAggregationExpression: SimpleFunctionExpression | undefined;
|
95
|
-
if (operationState instanceof
|
95
|
+
if (operationState instanceof QueryBuilderTDS_WindowAggreationOperatorState) {
|
96
96
|
// column param
|
97
97
|
const olapAggregateColumn = new PrimitiveInstanceValue(
|
98
98
|
GenericTypeExplicitReference.create(
|
@@ -133,10 +133,10 @@ const appendOLAPGroupByColumnState = (
|
|
133
133
|
};
|
134
134
|
|
135
135
|
export const appendOLAPGroupByState = (
|
136
|
-
olapGroupByState:
|
136
|
+
olapGroupByState: QueryBuilderWindowState,
|
137
137
|
lambda: LambdaFunction,
|
138
138
|
): LambdaFunction => {
|
139
|
-
olapGroupByState.
|
139
|
+
olapGroupByState.windowColumns.forEach((c) =>
|
140
140
|
appendOLAPGroupByColumnState(c, lambda),
|
141
141
|
);
|
142
142
|
return lambda;
|
@@ -18,7 +18,7 @@ import { PrimitiveType, type PureModel, type Type } from '@finos/legend-graph';
|
|
18
18
|
import { type Hashable, uuid } from '@finos/legend-shared';
|
19
19
|
import type { QueryBuilderTDSColumnState } from '../../QueryBuilderTDSColumnState.js';
|
20
20
|
|
21
|
-
export abstract class
|
21
|
+
export abstract class QueryBuilderTDS_WindowOperator implements Hashable {
|
22
22
|
readonly uuid = uuid();
|
23
23
|
|
24
24
|
abstract getLabel(): string;
|
@@ -16,11 +16,11 @@
|
|
16
16
|
|
17
17
|
import { hashArray } from '@finos/legend-shared';
|
18
18
|
import { type Type, PRIMITIVE_TYPE } from '@finos/legend-graph';
|
19
|
-
import {
|
19
|
+
import { QueryBuilderTDS_WindowOperator } from './QueryBuilderTDS_WindowOperator.js';
|
20
20
|
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../../graphManager/QueryBuilderHashUtils.js';
|
21
21
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graphManager/QueryBuilderSupportedFunctions.js';
|
22
22
|
|
23
|
-
export class
|
23
|
+
export class QueryBuilderTDS_WindowOperator_Average extends QueryBuilderTDS_WindowOperator {
|
24
24
|
override isColumnAggregator(): boolean {
|
25
25
|
return true;
|
26
26
|
}
|
@@ -33,7 +33,9 @@ export class QueryBuilderTDS_OLAPOperator_Average extends QueryBuilderTDS_OLAPOp
|
|
33
33
|
}
|
34
34
|
|
35
35
|
get hashCode(): string {
|
36
|
-
return hashArray([
|
36
|
+
return hashArray([
|
37
|
+
QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_OPERATOR_AVERAGE,
|
38
|
+
]);
|
37
39
|
}
|
38
40
|
|
39
41
|
isCompatibleWithType(type: Type | undefined): boolean {
|
@@ -16,11 +16,11 @@
|
|
16
16
|
|
17
17
|
import { hashArray } from '@finos/legend-shared';
|
18
18
|
import { type Type, PRIMITIVE_TYPE } from '@finos/legend-graph';
|
19
|
-
import {
|
19
|
+
import { QueryBuilderTDS_WindowOperator } from './QueryBuilderTDS_WindowOperator.js';
|
20
20
|
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../../graphManager/QueryBuilderHashUtils.js';
|
21
21
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graphManager/QueryBuilderSupportedFunctions.js';
|
22
22
|
|
23
|
-
export class
|
23
|
+
export class QueryBuilderTDS_WindowOperator_Count extends QueryBuilderTDS_WindowOperator {
|
24
24
|
override isColumnAggregator(): boolean {
|
25
25
|
return true;
|
26
26
|
}
|
@@ -33,7 +33,7 @@ export class QueryBuilderTDS_OLAPOperator_Count extends QueryBuilderTDS_OLAPOper
|
|
33
33
|
}
|
34
34
|
|
35
35
|
get hashCode(): string {
|
36
|
-
return hashArray([QUERY_BUILDER_HASH_STRUCTURE.
|
36
|
+
return hashArray([QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_OPERATOR_COUNT]);
|
37
37
|
}
|
38
38
|
|
39
39
|
isCompatibleWithType(type: Type | undefined): boolean {
|
@@ -16,11 +16,11 @@
|
|
16
16
|
|
17
17
|
import { hashArray } from '@finos/legend-shared';
|
18
18
|
import { type Type, PRIMITIVE_TYPE } from '@finos/legend-graph';
|
19
|
-
import {
|
19
|
+
import { QueryBuilderTDS_WindowOperator } from './QueryBuilderTDS_WindowOperator.js';
|
20
20
|
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../../graphManager/QueryBuilderHashUtils.js';
|
21
21
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graphManager/QueryBuilderSupportedFunctions.js';
|
22
22
|
|
23
|
-
export class
|
23
|
+
export class QueryBuilderTDS_WindowOperator_Max extends QueryBuilderTDS_WindowOperator {
|
24
24
|
override isColumnAggregator(): boolean {
|
25
25
|
return true;
|
26
26
|
}
|
@@ -33,7 +33,7 @@ export class QueryBuilderTDS_OLAPOperator_Max extends QueryBuilderTDS_OLAPOperat
|
|
33
33
|
}
|
34
34
|
|
35
35
|
get hashCode(): string {
|
36
|
-
return hashArray([QUERY_BUILDER_HASH_STRUCTURE.
|
36
|
+
return hashArray([QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_OPERATOR_MAX]);
|
37
37
|
}
|
38
38
|
|
39
39
|
isCompatibleWithType(type: Type | undefined): boolean {
|
@@ -16,11 +16,11 @@
|
|
16
16
|
|
17
17
|
import { hashArray } from '@finos/legend-shared';
|
18
18
|
import { type Type, PRIMITIVE_TYPE } from '@finos/legend-graph';
|
19
|
-
import {
|
19
|
+
import { QueryBuilderTDS_WindowOperator } from './QueryBuilderTDS_WindowOperator.js';
|
20
20
|
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../../graphManager/QueryBuilderHashUtils.js';
|
21
21
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graphManager/QueryBuilderSupportedFunctions.js';
|
22
22
|
|
23
|
-
export class
|
23
|
+
export class QueryBuilderTDS_WindowOperator_Min extends QueryBuilderTDS_WindowOperator {
|
24
24
|
override isColumnAggregator(): boolean {
|
25
25
|
return true;
|
26
26
|
}
|
@@ -33,7 +33,7 @@ export class QueryBuilderTDS_OLAPOperator_Min extends QueryBuilderTDS_OLAPOperat
|
|
33
33
|
}
|
34
34
|
|
35
35
|
get hashCode(): string {
|
36
|
-
return hashArray([QUERY_BUILDER_HASH_STRUCTURE.
|
36
|
+
return hashArray([QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_OPERATOR_MIN]);
|
37
37
|
}
|
38
38
|
|
39
39
|
isCompatibleWithType(type: Type | undefined): boolean {
|
@@ -16,11 +16,11 @@
|
|
16
16
|
|
17
17
|
import { hashArray } from '@finos/legend-shared';
|
18
18
|
import { type Type, PRIMITIVE_TYPE } from '@finos/legend-graph';
|
19
|
-
import {
|
19
|
+
import { QueryBuilderTDS_WindowOperator } from './QueryBuilderTDS_WindowOperator.js';
|
20
20
|
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../../graphManager/QueryBuilderHashUtils.js';
|
21
21
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graphManager/QueryBuilderSupportedFunctions.js';
|
22
22
|
|
23
|
-
export class
|
23
|
+
export class QueryBuilderTDS_WindowOperator_Sum extends QueryBuilderTDS_WindowOperator {
|
24
24
|
override isColumnAggregator(): boolean {
|
25
25
|
return true;
|
26
26
|
}
|
@@ -33,7 +33,7 @@ export class QueryBuilderTDS_OLAPOperator_Sum extends QueryBuilderTDS_OLAPOperat
|
|
33
33
|
}
|
34
34
|
|
35
35
|
get hashCode(): string {
|
36
|
-
return hashArray([QUERY_BUILDER_HASH_STRUCTURE.
|
36
|
+
return hashArray([QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_OPERATOR_SUM]);
|
37
37
|
}
|
38
38
|
|
39
39
|
isCompatibleWithType(type: Type | undefined): boolean {
|
@@ -18,9 +18,9 @@ import { PRIMITIVE_TYPE, type Type } from '@finos/legend-graph';
|
|
18
18
|
import { hashArray } from '@finos/legend-shared';
|
19
19
|
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../../graphManager/QueryBuilderHashUtils.js';
|
20
20
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graphManager/QueryBuilderSupportedFunctions.js';
|
21
|
-
import {
|
21
|
+
import { QueryBuilderTDS_WindowOperator } from './QueryBuilderTDS_WindowOperator.js';
|
22
22
|
|
23
|
-
export class
|
23
|
+
export class QueryBuilderTDS_WindowRankOperator_AverageRank extends QueryBuilderTDS_WindowOperator {
|
24
24
|
getLabel(): string {
|
25
25
|
return 'average rank';
|
26
26
|
}
|
@@ -31,7 +31,7 @@ export class QueryBuilderTDS_OLAPRankOperator_AverageRank extends QueryBuilderTD
|
|
31
31
|
|
32
32
|
get hashCode(): string {
|
33
33
|
return hashArray([
|
34
|
-
QUERY_BUILDER_HASH_STRUCTURE.
|
34
|
+
QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_OPERATOR_DENSE_RANK,
|
35
35
|
]);
|
36
36
|
}
|
37
37
|
|