@finos/legend-query-builder 0.6.22 → 0.6.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -19,8 +19,10 @@ import {
|
|
|
19
19
|
Dialog,
|
|
20
20
|
Modal,
|
|
21
21
|
ModalBody,
|
|
22
|
+
ModalFooterButton,
|
|
22
23
|
ModalFooter,
|
|
23
24
|
ModalHeader,
|
|
25
|
+
ModalFooterStatus,
|
|
24
26
|
} from '@finos/legend-art';
|
|
25
27
|
import {
|
|
26
28
|
type PureModel,
|
|
@@ -28,8 +30,8 @@ import {
|
|
|
28
30
|
type ObserverContext,
|
|
29
31
|
PrimitiveType,
|
|
30
32
|
} from '@finos/legend-graph';
|
|
31
|
-
import { prettyCONSTName } from '@finos/legend-shared';
|
|
32
33
|
import { observer } from 'mobx-react-lite';
|
|
34
|
+
import { useState } from 'react';
|
|
33
35
|
import type { LambdaParametersState } from '../../stores/shared/LambdaParameterState.js';
|
|
34
36
|
import { BasicValueSpecificationEditor } from './BasicValueSpecificationEditor.js';
|
|
35
37
|
|
|
@@ -41,12 +43,18 @@ export const LambdaParameterValuesEditor = observer(
|
|
|
41
43
|
lambdaParametersState: LambdaParametersState;
|
|
42
44
|
}) => {
|
|
43
45
|
const { lambdaParametersState, graph, observerContext } = props;
|
|
46
|
+
const [isSubmitAction, setIsSubmitAction] = useState(false);
|
|
47
|
+
const [isClosingAction, setIsClosingAction] = useState(false);
|
|
44
48
|
const valuesEdtiorState = lambdaParametersState.parameterValuesEditorState;
|
|
45
|
-
const close = (): void =>
|
|
49
|
+
const close = (): void => {
|
|
50
|
+
setIsClosingAction(true);
|
|
51
|
+
valuesEdtiorState.close();
|
|
52
|
+
};
|
|
46
53
|
const applicationStore = useApplicationStore();
|
|
47
54
|
const submitAction = valuesEdtiorState.submitAction;
|
|
48
55
|
const submit = applicationStore.guardUnhandledError(async () => {
|
|
49
56
|
if (submitAction) {
|
|
57
|
+
setIsSubmitAction(true);
|
|
50
58
|
close();
|
|
51
59
|
await submitAction.handler();
|
|
52
60
|
}
|
|
@@ -106,18 +114,23 @@ export const LambdaParameterValuesEditor = observer(
|
|
|
106
114
|
})}
|
|
107
115
|
</ModalBody>
|
|
108
116
|
<ModalFooter>
|
|
117
|
+
{isClosingAction && (
|
|
118
|
+
<ModalFooterStatus> Closing...</ModalFooterStatus>
|
|
119
|
+
)}
|
|
109
120
|
{submitAction && (
|
|
110
|
-
<
|
|
111
|
-
|
|
112
|
-
|
|
121
|
+
<ModalFooterButton
|
|
122
|
+
inProgress={isSubmitAction}
|
|
123
|
+
inProgressText={`${submitAction.label}...`}
|
|
113
124
|
onClick={submit}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
</button>
|
|
125
|
+
text={submitAction.label}
|
|
126
|
+
/>
|
|
117
127
|
)}
|
|
118
|
-
<
|
|
119
|
-
|
|
120
|
-
|
|
128
|
+
<ModalFooterButton
|
|
129
|
+
inProgress={isClosingAction}
|
|
130
|
+
inProgressText={'Closing...'}
|
|
131
|
+
onClick={close}
|
|
132
|
+
text="Close"
|
|
133
|
+
/>
|
|
121
134
|
</ModalFooter>
|
|
122
135
|
</Modal>
|
|
123
136
|
</Dialog>
|
|
@@ -133,7 +133,7 @@ export const VariableViewer = observer(
|
|
|
133
133
|
<TimesIcon />
|
|
134
134
|
</button>
|
|
135
135
|
<VariableInfoTooltip variable={variable}>
|
|
136
|
-
<div className="value-spec-editor__variable__info">
|
|
136
|
+
<div className="query-builder__variables__variable__action value-spec-editor__variable__info">
|
|
137
137
|
<InfoCircleIcon />
|
|
138
138
|
</div>
|
|
139
139
|
</VariableInfoTooltip>
|
|
@@ -157,7 +157,7 @@ const ClassQueryBuilderSetupPanelContent = observer(
|
|
|
157
157
|
filterOption={mappingFilterOption}
|
|
158
158
|
formatOptionLabel={getPackageableElementOptionFormatter({
|
|
159
159
|
darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled,
|
|
160
|
-
|
|
160
|
+
graph: queryBuilderState.graphManagerState.graph,
|
|
161
161
|
})}
|
|
162
162
|
/>
|
|
163
163
|
</div>
|
|
@@ -151,7 +151,7 @@ const MappingQueryBuilderSetupPanelContent = observer(
|
|
|
151
151
|
filterOption={mappingFilterOption}
|
|
152
152
|
formatOptionLabel={getPackageableElementOptionFormatter({
|
|
153
153
|
darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled,
|
|
154
|
-
|
|
154
|
+
graph: queryBuilderState.graphManagerState.graph,
|
|
155
155
|
})}
|
|
156
156
|
/>
|
|
157
157
|
</div>
|
|
@@ -67,20 +67,20 @@ export enum QUERY_BUILDER_HASH_STRUCTURE {
|
|
|
67
67
|
WATERMARK_STATE = 'WATERMARK_STATE',
|
|
68
68
|
|
|
69
69
|
// OLAPGroup state
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
70
|
+
TDS_WINDOW_GROUPBY_STATE = 'TDS_WINDOW_STATE',
|
|
71
|
+
TDS_WINDOW_GROUPBY_OPERATION_STATE = 'TDS_WINDOW_OPERATION_STATE',
|
|
72
|
+
TDS_WINDOW_GROUPBY_AGG_OPERATION_STATE = 'TDS_WINDOW_AGG_OPERATION_STATE',
|
|
73
|
+
TDS_WINDOW_COLUMN_STATE = 'TDS_WINDOW_COLUMN_STATE',
|
|
74
|
+
TDS_WINDOW_COLUMN_SORTBY_STATE = 'TDS_WINDOW_COLUMN_SORTBY_STATE',
|
|
75
|
+
TDS_WINDOW_OPERATOR_RANK = 'TDS_WINDOW_OPERATOR_RANK',
|
|
76
|
+
TDS_WINDOW_OPERATOR_AVERAGE_RANK = 'TDS_WINDOW_OPERATOR_AVERAGE_RANK',
|
|
77
|
+
TDS_WINDOW_OPERATOR_DENSE_RANK = 'TDS_WINDOW_OPERATOR_DENSE_RANK',
|
|
78
|
+
TDS_WINDOW_OPERATOR_ROW_NUMBER = 'TDS_WINDOW_OPERATOR_ROW_NUMBER',
|
|
79
|
+
TDS_WINDOW_OPERATOR_SUM = 'TDS_WINDOW_OPERATOR_SUM',
|
|
80
|
+
TDS_WINDOW_OPERATOR_MAX = 'TDS_WINDOW_OPERATOR_MAX',
|
|
81
|
+
TDS_WINDOW_OPERATOR_MIN = 'TDS_WINDOW_OPERATOR_MIN',
|
|
82
|
+
TDS_WINDOW_OPERATOR_COUNT = 'TDS_WINDOW_OPERATOR_COUNT',
|
|
83
|
+
TDS_WINDOW_OPERATOR_AVERAGE = 'TDS_WINDOW_OPERATOR_AVERAGE',
|
|
84
84
|
|
|
85
85
|
// filter state
|
|
86
86
|
FILTER_TREE_GROUP_NODE_DATA = 'FILTER_TREE_GROUP_NODE_DATA',
|
|
@@ -19,6 +19,7 @@ export enum QUERY_BUILDER_SUPPORTED_FUNCTIONS {
|
|
|
19
19
|
EXISTS = 'meta::pure::functions::collection::exists',
|
|
20
20
|
FILTER = 'meta::pure::functions::collection::filter',
|
|
21
21
|
GET_ALL = 'meta::pure::functions::collection::getAll',
|
|
22
|
+
GET_ALL_VERSIONS = 'meta::pure::functions::collection::getAllVersions',
|
|
22
23
|
NOT = 'meta::pure::functions::boolean::not',
|
|
23
24
|
OR = 'meta::pure::functions::boolean::or',
|
|
24
25
|
TAKE = 'meta::pure::functions::collection::take',
|
|
@@ -141,7 +141,9 @@ export const buildNumericPreviewDataQuery = (
|
|
|
141
141
|
aggregationState.changeColumnAggregateOperator(valAggOp, colState);
|
|
142
142
|
});
|
|
143
143
|
|
|
144
|
-
return builderState.resultState.buildExecutionRawLambda(
|
|
144
|
+
return builderState.resultState.buildExecutionRawLambda({
|
|
145
|
+
useAllVersionsForMilestoning: true,
|
|
146
|
+
});
|
|
145
147
|
};
|
|
146
148
|
|
|
147
149
|
export const buildNonNumericPreviewDataQuery = (
|
|
@@ -198,5 +200,7 @@ export const buildNonNumericPreviewDataQuery = (
|
|
|
198
200
|
sortValueCount,
|
|
199
201
|
new SortColumnState(valueProjectionColState),
|
|
200
202
|
];
|
|
201
|
-
return builderState.resultState.buildExecutionRawLambda(
|
|
203
|
+
return builderState.resultState.buildExecutionRawLambda({
|
|
204
|
+
useAllVersionsForMilestoning: true,
|
|
205
|
+
});
|
|
202
206
|
};
|
|
@@ -42,6 +42,7 @@ import {
|
|
|
42
42
|
buildExecutionParameterValues,
|
|
43
43
|
getExecutionQueryFromRawLambda,
|
|
44
44
|
} from './shared/LambdaParameterState.js';
|
|
45
|
+
import type { LambdaFunctionBuilderOption } from './QueryBuilderValueSpecificationBuilderHelper.js';
|
|
45
46
|
|
|
46
47
|
const DEFAULT_LIMIT = 1000;
|
|
47
48
|
|
|
@@ -51,6 +52,7 @@ export class QueryBuilderResultState {
|
|
|
51
52
|
readonly executionPlanState: ExecutionPlanState;
|
|
52
53
|
|
|
53
54
|
previewLimit = DEFAULT_LIMIT;
|
|
55
|
+
pressedRunQuery = ActionState.create();
|
|
54
56
|
isRunningQuery = false;
|
|
55
57
|
isGeneratingPlan = false;
|
|
56
58
|
executionResult?: ExecutionResult | undefined;
|
|
@@ -113,11 +115,14 @@ export class QueryBuilderResultState {
|
|
|
113
115
|
return false;
|
|
114
116
|
}
|
|
115
117
|
|
|
116
|
-
buildExecutionRawLambda(
|
|
118
|
+
buildExecutionRawLambda(
|
|
119
|
+
executionOptions?: LambdaFunctionBuilderOption,
|
|
120
|
+
): RawLambda {
|
|
117
121
|
let query: RawLambda;
|
|
118
122
|
if (this.queryBuilderState.isQuerySupported) {
|
|
119
123
|
const lambdaFunction = buildLambdaFunction(this.queryBuilderState, {
|
|
120
124
|
isBuildingExecutionQuery: true,
|
|
125
|
+
...executionOptions,
|
|
121
126
|
});
|
|
122
127
|
query = buildRawLambdaFromLambdaFunction(
|
|
123
128
|
lambdaFunction,
|
|
@@ -241,6 +246,7 @@ export class QueryBuilderResultState {
|
|
|
241
246
|
this.queryBuilderState.applicationStore.notifyError(error);
|
|
242
247
|
} finally {
|
|
243
248
|
this.setIsRunningQuery(false);
|
|
249
|
+
this.pressedRunQuery.complete();
|
|
244
250
|
}
|
|
245
251
|
}
|
|
246
252
|
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
} from './fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js';
|
|
67
67
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../graphManager/QueryBuilderSupportedFunctions.js';
|
|
68
68
|
import { LambdaParameterState } from './shared/LambdaParameterState.js';
|
|
69
|
-
import { processTDS_OLAPGroupByExpression } from './fetch-structure/tds/
|
|
69
|
+
import { processTDS_OLAPGroupByExpression } from './fetch-structure/tds/window/QueryBuilderWindowStateBuilder.js';
|
|
70
70
|
import { processWatermarkExpression } from './watermark/QueryBuilderWatermarkStateBuilder.js';
|
|
71
71
|
import { QueryBuilderConstantExpressionState } from './QueryBuilderConstantsState.js';
|
|
72
72
|
|
|
@@ -57,6 +57,24 @@ const buildGetAllFunction = (
|
|
|
57
57
|
return _func;
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
+
const buildGetAllVersionsFunction = (
|
|
61
|
+
_class: Class,
|
|
62
|
+
multiplicity: Multiplicity,
|
|
63
|
+
): SimpleFunctionExpression => {
|
|
64
|
+
const _func = new SimpleFunctionExpression(
|
|
65
|
+
extractElementNameFromPath(
|
|
66
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.GET_ALL_VERSIONS,
|
|
67
|
+
),
|
|
68
|
+
);
|
|
69
|
+
const classInstance = new InstanceValue(
|
|
70
|
+
multiplicity,
|
|
71
|
+
GenericTypeExplicitReference.create(new GenericType(_class)),
|
|
72
|
+
);
|
|
73
|
+
classInstance.values[0] = PackageableElementExplicitReference.create(_class);
|
|
74
|
+
_func.parametersValues.push(classInstance);
|
|
75
|
+
return _func;
|
|
76
|
+
};
|
|
77
|
+
|
|
60
78
|
const buildLetExpression = (
|
|
61
79
|
constantExpressionState: QueryBuilderConstantExpressionState,
|
|
62
80
|
): SimpleFunctionExpression => {
|
|
@@ -101,20 +119,31 @@ export const buildLambdaFunction = (
|
|
|
101
119
|
),
|
|
102
120
|
);
|
|
103
121
|
|
|
104
|
-
// build getAll()
|
|
105
|
-
const getAllFunction = buildGetAllFunction(_class, Multiplicity.ONE);
|
|
106
|
-
|
|
107
|
-
// build milestoning parameter(s) for getAll()
|
|
108
122
|
const milestoningStereotype = getMilestoneTemporalStereotype(
|
|
109
123
|
_class,
|
|
110
124
|
queryBuilderState.graphManagerState.graph,
|
|
111
125
|
);
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
126
|
+
|
|
127
|
+
if (milestoningStereotype && options?.useAllVersionsForMilestoning) {
|
|
128
|
+
// build getAllVersions() when we preview data for milestoned classes
|
|
129
|
+
// because if we use getAll() we need to pass in data to execute the query
|
|
130
|
+
// but we don't give user that option in this flow.
|
|
131
|
+
const getAllVersionsFunction = buildGetAllVersionsFunction(
|
|
132
|
+
_class,
|
|
133
|
+
Multiplicity.ONE,
|
|
134
|
+
);
|
|
135
|
+
lambdaFunction.expressionSequence[0] = getAllVersionsFunction;
|
|
136
|
+
} else {
|
|
137
|
+
// build getAll()
|
|
138
|
+
const getAllFunction = buildGetAllFunction(_class, Multiplicity.ONE);
|
|
139
|
+
if (milestoningStereotype) {
|
|
140
|
+
// build milestoning parameter(s) for getAll()
|
|
141
|
+
queryBuilderState.milestoningState
|
|
142
|
+
.getMilestoningImplementation(milestoningStereotype)
|
|
143
|
+
.buildGetAllParameters(getAllFunction);
|
|
144
|
+
}
|
|
145
|
+
lambdaFunction.expressionSequence[0] = getAllFunction;
|
|
116
146
|
}
|
|
117
|
-
lambdaFunction.expressionSequence[0] = getAllFunction;
|
|
118
147
|
|
|
119
148
|
// build watermark
|
|
120
149
|
buildWatermarkExpression(queryBuilderState.watermarkState, lambdaFunction);
|
|
@@ -139,7 +168,10 @@ export const buildLambdaFunction = (
|
|
|
139
168
|
];
|
|
140
169
|
}
|
|
141
170
|
// build parameters
|
|
142
|
-
if (
|
|
171
|
+
if (
|
|
172
|
+
queryBuilderState.parametersState.parameterStates.length &&
|
|
173
|
+
!options?.useAllVersionsForMilestoning
|
|
174
|
+
) {
|
|
143
175
|
if (options?.isBuildingExecutionQuery) {
|
|
144
176
|
buildExecutionQueryFromLambdaFunction(
|
|
145
177
|
lambdaFunction,
|
|
@@ -16,9 +16,12 @@
|
|
|
16
16
|
|
|
17
17
|
import {
|
|
18
18
|
AbstractPropertyExpression,
|
|
19
|
+
Class,
|
|
19
20
|
DerivedProperty,
|
|
20
21
|
INTERNAL__PropagatedValue,
|
|
21
22
|
matchFunctionName,
|
|
23
|
+
MILESTONING_VERSION_PROPERTY_SUFFIX,
|
|
24
|
+
PropertyExplicitReference,
|
|
22
25
|
SimpleFunctionExpression,
|
|
23
26
|
VariableExpression,
|
|
24
27
|
type ValueSpecification,
|
|
@@ -30,7 +33,11 @@ import {
|
|
|
30
33
|
} from '@finos/legend-shared';
|
|
31
34
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../graphManager/QueryBuilderSupportedFunctions.js';
|
|
32
35
|
import type { QueryBuilderState } from './QueryBuilderState.js';
|
|
33
|
-
import {
|
|
36
|
+
import {
|
|
37
|
+
functionExpression_setParametersValues,
|
|
38
|
+
propertyExpression_setFunc,
|
|
39
|
+
variableExpression_setName,
|
|
40
|
+
} from './shared/ValueSpecificationModifierHelper.js';
|
|
34
41
|
|
|
35
42
|
/**
|
|
36
43
|
* Gets the value of ValueSpecification given INTERNAL__PropagatedValue is pointing to.
|
|
@@ -50,6 +57,7 @@ export const buildPropertyExpressionChain = (
|
|
|
50
57
|
propertyExpression: AbstractPropertyExpression,
|
|
51
58
|
queryBuilderState: QueryBuilderState,
|
|
52
59
|
lambdaParameterName: string,
|
|
60
|
+
options?: LambdaFunctionBuilderOption,
|
|
53
61
|
/**
|
|
54
62
|
* As of now, we don't support date propagation for aggregation-class functions
|
|
55
63
|
* so we have this temporary flag to disable date propagation, there could be other
|
|
@@ -81,45 +89,75 @@ export const buildPropertyExpressionChain = (
|
|
|
81
89
|
currentExpression instanceof AbstractPropertyExpression &&
|
|
82
90
|
currentExpression.func.value instanceof DerivedProperty
|
|
83
91
|
) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
// check if we are building the expression chain to view preview data and if the
|
|
93
|
+
// the property is milestoned. If that is the case we need to replace the
|
|
94
|
+
// `property` with `propertyAllVersions`
|
|
95
|
+
if (
|
|
96
|
+
options?.useAllVersionsForMilestoning &&
|
|
97
|
+
currentExpression.func.value.genericType.value.rawType instanceof
|
|
98
|
+
Class &&
|
|
99
|
+
currentExpression.func.value._OWNER._generatedMilestonedProperties
|
|
100
|
+
.length !== 0
|
|
101
|
+
) {
|
|
102
|
+
const name = currentExpression.func.value.name;
|
|
103
|
+
const property =
|
|
104
|
+
currentExpression.func.value._OWNER._generatedMilestonedProperties.find(
|
|
105
|
+
(e) =>
|
|
106
|
+
e.name ===
|
|
107
|
+
`${name}${MILESTONING_VERSION_PROPERTY_SUFFIX.ALL_VERSIONS}`,
|
|
108
|
+
);
|
|
109
|
+
if (property) {
|
|
110
|
+
propertyExpression_setFunc(
|
|
111
|
+
currentExpression,
|
|
112
|
+
PropertyExplicitReference.create(property),
|
|
113
|
+
);
|
|
114
|
+
functionExpression_setParametersValues(
|
|
115
|
+
currentExpression,
|
|
116
|
+
[guaranteeNonNullable(currentExpression.parametersValues[0])],
|
|
117
|
+
queryBuilderState.observableContext,
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
const currentPropertyExpression = currentExpression;
|
|
122
|
+
const parameterValues = currentExpression.parametersValues.slice(1);
|
|
123
|
+
parameterValues.forEach((parameterValue, index) => {
|
|
124
|
+
if (parameterValue instanceof INTERNAL__PropagatedValue) {
|
|
125
|
+
// Replace with argumentless derived property expression only when default date propagation is supported
|
|
95
126
|
if (
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
(index === 0 &&
|
|
99
|
-
currentPropertyExpression.parametersValues.length === 3 &&
|
|
100
|
-
!(
|
|
101
|
-
currentPropertyExpression.parametersValues[2] instanceof
|
|
102
|
-
INTERNAL__PropagatedValue &&
|
|
103
|
-
currentPropertyExpression.parametersValues[2]
|
|
104
|
-
.isPropagatedValue === true
|
|
105
|
-
))
|
|
127
|
+
!TEMPORARY__disableDatePropagation &&
|
|
128
|
+
parameterValue.isPropagatedValue
|
|
106
129
|
) {
|
|
130
|
+
// NOTE: For `bitemporal` property check if the property expression has parameters which are not instance of
|
|
131
|
+
// `INTERNAL_PropagatedValue` then pass the parameters as user explicitly changed values of either of the parameters.
|
|
132
|
+
if (
|
|
133
|
+
(index === 1 &&
|
|
134
|
+
currentPropertyExpression.parametersValues.length === 3) ||
|
|
135
|
+
(index === 0 &&
|
|
136
|
+
currentPropertyExpression.parametersValues.length === 3 &&
|
|
137
|
+
!(
|
|
138
|
+
currentPropertyExpression.parametersValues[2] instanceof
|
|
139
|
+
INTERNAL__PropagatedValue &&
|
|
140
|
+
currentPropertyExpression.parametersValues[2]
|
|
141
|
+
.isPropagatedValue === true
|
|
142
|
+
))
|
|
143
|
+
) {
|
|
144
|
+
currentPropertyExpression.parametersValues[index + 1] =
|
|
145
|
+
getValueOfInternalPropagatedValue(parameterValue);
|
|
146
|
+
} else {
|
|
147
|
+
currentPropertyExpression.parametersValues = [
|
|
148
|
+
guaranteeNonNullable(
|
|
149
|
+
guaranteeType(currentExpression, AbstractPropertyExpression)
|
|
150
|
+
.parametersValues[0],
|
|
151
|
+
),
|
|
152
|
+
];
|
|
153
|
+
}
|
|
154
|
+
} else {
|
|
107
155
|
currentPropertyExpression.parametersValues[index + 1] =
|
|
108
156
|
getValueOfInternalPropagatedValue(parameterValue);
|
|
109
|
-
} else {
|
|
110
|
-
currentPropertyExpression.parametersValues = [
|
|
111
|
-
guaranteeNonNullable(
|
|
112
|
-
guaranteeType(currentExpression, AbstractPropertyExpression)
|
|
113
|
-
.parametersValues[0],
|
|
114
|
-
),
|
|
115
|
-
];
|
|
116
157
|
}
|
|
117
|
-
} else {
|
|
118
|
-
currentPropertyExpression.parametersValues[index + 1] =
|
|
119
|
-
getValueOfInternalPropagatedValue(parameterValue);
|
|
120
158
|
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
123
161
|
}
|
|
124
162
|
currentExpression = nextExpression;
|
|
125
163
|
// Take care of chains of subtype (a pattern that is not useful, but we want to support and rectify)
|
|
@@ -150,5 +188,12 @@ export type LambdaFunctionBuilderOption = {
|
|
|
150
188
|
* queryBuilderState will make the lambda function building process overrides several query values, such as the row limit.
|
|
151
189
|
*/
|
|
152
190
|
isBuildingExecutionQuery?: boolean | undefined;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Set this to `true` when we construct query for execution within the app to view preview data.
|
|
194
|
+
* queryBuilderState will make the lambda function building process overrides `.all()` to `.allVersions()` if the Class
|
|
195
|
+
* is milestoned and `property` to `propertyAllVersions` if a property is milestoned.
|
|
196
|
+
*/
|
|
197
|
+
useAllVersionsForMilestoning?: boolean | undefined;
|
|
153
198
|
keepSourceInformation?: boolean | undefined;
|
|
154
199
|
};
|
|
@@ -92,9 +92,9 @@ import type { LambdaFunctionBuilderOption } from '../../QueryBuilderValueSpecifi
|
|
|
92
92
|
import { appendProjection } from './projection/QueryBuilderProjectionValueSpecificationBuilder.js';
|
|
93
93
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../graphManager/QueryBuilderSupportedFunctions.js';
|
|
94
94
|
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../graphManager/QueryBuilderHashUtils.js';
|
|
95
|
-
import {
|
|
96
|
-
import type {
|
|
97
|
-
import {
|
|
95
|
+
import { QueryBuilderWindowState } from './window/QueryBuilderWindowState.js';
|
|
96
|
+
import type { QueryBuilderTDS_WindowOperator } from './window/operators/QueryBuilderTDS_WindowOperator.js';
|
|
97
|
+
import { getQueryBuilderCoreWindowOperators } from './window/QueryBuilderWindowGroupByOperatorLoader.js';
|
|
98
98
|
import type { QueryBuilderTDSColumnState } from './QueryBuilderTDSColumnState.js';
|
|
99
99
|
|
|
100
100
|
export class QueryBuilderTDSState
|
|
@@ -103,19 +103,19 @@ export class QueryBuilderTDSState
|
|
|
103
103
|
{
|
|
104
104
|
readonly aggregationState: QueryBuilderAggregationState;
|
|
105
105
|
readonly postFilterState: QueryBuilderPostFilterState;
|
|
106
|
-
readonly
|
|
106
|
+
readonly windowState: QueryBuilderWindowState;
|
|
107
107
|
readonly resultSetModifierState: QueryResultSetModifierState;
|
|
108
108
|
projectionColumns: QueryBuilderProjectionColumnState[] = [];
|
|
109
109
|
isConvertDerivationProjectionObjects = false;
|
|
110
110
|
showPostFilterPanel = false;
|
|
111
|
-
|
|
111
|
+
showWindowFuncPanel = false;
|
|
112
112
|
|
|
113
113
|
postFilterOperators: QueryBuilderPostFilterOperator[] =
|
|
114
114
|
getQueryBuilderCorePostFilterOperators();
|
|
115
115
|
aggregationOperators: QueryBuilderAggregateOperator[] =
|
|
116
116
|
getQueryBuilderCoreAggregrationOperators();
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
windowFuncOperators: QueryBuilderTDS_WindowOperator[] =
|
|
118
|
+
getQueryBuilderCoreWindowOperators();
|
|
119
119
|
|
|
120
120
|
constructor(
|
|
121
121
|
queryBuilderState: QueryBuilderState,
|
|
@@ -127,7 +127,7 @@ export class QueryBuilderTDSState
|
|
|
127
127
|
projectionColumns: observable,
|
|
128
128
|
isConvertDerivationProjectionObjects: observable,
|
|
129
129
|
showPostFilterPanel: observable,
|
|
130
|
-
|
|
130
|
+
showWindowFuncPanel: observable,
|
|
131
131
|
TEMPORARY__showPostFetchStructurePanel: computed,
|
|
132
132
|
derivations: computed,
|
|
133
133
|
hasParserError: computed,
|
|
@@ -135,7 +135,7 @@ export class QueryBuilderTDSState
|
|
|
135
135
|
moveColumn: action,
|
|
136
136
|
replaceColumn: action,
|
|
137
137
|
setShowPostFilterPanel: action,
|
|
138
|
-
|
|
138
|
+
setShowWindowFuncPanel: action,
|
|
139
139
|
convertDerivationProjectionObjects: flow,
|
|
140
140
|
});
|
|
141
141
|
|
|
@@ -148,9 +148,9 @@ export class QueryBuilderTDSState
|
|
|
148
148
|
this,
|
|
149
149
|
this.aggregationOperators,
|
|
150
150
|
);
|
|
151
|
-
this.
|
|
151
|
+
this.windowState = new QueryBuilderWindowState(
|
|
152
152
|
this,
|
|
153
|
-
this.
|
|
153
|
+
this.windowFuncOperators,
|
|
154
154
|
);
|
|
155
155
|
}
|
|
156
156
|
|
|
@@ -173,7 +173,7 @@ export class QueryBuilderTDSState
|
|
|
173
173
|
override get TEMPORARY__showPostFetchStructurePanel(): boolean {
|
|
174
174
|
return (
|
|
175
175
|
this.queryBuilderState.filterState.showPanel ||
|
|
176
|
-
this.
|
|
176
|
+
this.showWindowFuncPanel ||
|
|
177
177
|
this.showPostFilterPanel
|
|
178
178
|
);
|
|
179
179
|
}
|
|
@@ -279,7 +279,7 @@ export class QueryBuilderTDSState
|
|
|
279
279
|
return [
|
|
280
280
|
...this.aggregationState.columns,
|
|
281
281
|
...projectionColumns,
|
|
282
|
-
...this.
|
|
282
|
+
...this.windowState.windowColumns,
|
|
283
283
|
];
|
|
284
284
|
}
|
|
285
285
|
|
|
@@ -293,7 +293,7 @@ export class QueryBuilderTDSState
|
|
|
293
293
|
return Boolean(
|
|
294
294
|
[
|
|
295
295
|
...this.postFilterState.referencedTDSColumns,
|
|
296
|
-
...this.
|
|
296
|
+
...this.windowState.referencedTDSColumns,
|
|
297
297
|
].find((col) => {
|
|
298
298
|
if (col instanceof QueryBuilderAggregateColumnState) {
|
|
299
299
|
return tdsCol instanceof QueryBuilderAggregateColumnState
|
|
@@ -320,8 +320,8 @@ export class QueryBuilderTDSState
|
|
|
320
320
|
this.showPostFilterPanel = val;
|
|
321
321
|
}
|
|
322
322
|
|
|
323
|
-
|
|
324
|
-
this.
|
|
323
|
+
setShowWindowFuncPanel(val: boolean): void {
|
|
324
|
+
this.showWindowFuncPanel = val;
|
|
325
325
|
}
|
|
326
326
|
|
|
327
327
|
*convertDerivationProjectionObjects(): GeneratorFn<void> {
|
package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { Multiplicity } from '@finos/legend-graph';
|
|
18
18
|
import { UnsupportedOperationError } from '@finos/legend-shared';
|
|
19
19
|
import { QueryBuilderAggregateColumnState } from '../../aggregation/QueryBuilderAggregationState.js';
|
|
20
|
-
import {
|
|
20
|
+
import { QueryBuilderWindowColumnState } from '../../window/QueryBuilderWindowState.js';
|
|
21
21
|
import { QueryBuilderSimpleProjectionColumnState } from '../../projection/QueryBuilderProjectionColumnState.js';
|
|
22
22
|
import type { QueryBuilderTDSColumnState } from '../../QueryBuilderTDSColumnState.js';
|
|
23
23
|
|
|
@@ -26,7 +26,7 @@ export const getColumnMultiplicity = (
|
|
|
26
26
|
): Multiplicity => {
|
|
27
27
|
if (
|
|
28
28
|
columnState instanceof QueryBuilderAggregateColumnState ||
|
|
29
|
-
columnState instanceof
|
|
29
|
+
columnState instanceof QueryBuilderWindowColumnState
|
|
30
30
|
) {
|
|
31
31
|
return Multiplicity.ONE;
|
|
32
32
|
} else if (columnState instanceof QueryBuilderSimpleProjectionColumnState) {
|
package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts
CHANGED
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../graphManager/QueryBuilderSupportedFunctions.js';
|
|
48
48
|
import { buildGenericLambdaFunctionInstanceValue } from '../../../QueryBuilderValueSpecificationHelper.js';
|
|
49
49
|
import { buildPropertyExpressionChain } from '../../../QueryBuilderValueSpecificationBuilderHelper.js';
|
|
50
|
-
import { appendOLAPGroupByState } from '../
|
|
50
|
+
import { appendOLAPGroupByState } from '../window/QueryBuilderWindowValueSpecificationBuilder.js';
|
|
51
51
|
import { appendPostFilter } from '../post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js';
|
|
52
52
|
|
|
53
53
|
const buildSortExpression = (
|
|
@@ -227,6 +227,7 @@ export const appendProjection = (
|
|
|
227
227
|
projectionColumnState.propertyExpressionState.propertyExpression,
|
|
228
228
|
projectionColumnState.propertyExpressionState.queryBuilderState,
|
|
229
229
|
projectionColumnState.lambdaParameterName,
|
|
230
|
+
options,
|
|
230
231
|
true,
|
|
231
232
|
),
|
|
232
233
|
],
|
|
@@ -328,6 +329,7 @@ export const appendProjection = (
|
|
|
328
329
|
projectionColumnState.propertyExpressionState.propertyExpression,
|
|
329
330
|
projectionColumnState.propertyExpressionState.queryBuilderState,
|
|
330
331
|
projectionColumnState.lambdaParameterName,
|
|
332
|
+
options,
|
|
331
333
|
),
|
|
332
334
|
],
|
|
333
335
|
queryBuilderState.graphManagerState.graph,
|
|
@@ -368,7 +370,7 @@ export const appendProjection = (
|
|
|
368
370
|
}
|
|
369
371
|
|
|
370
372
|
// build olapGroupBy
|
|
371
|
-
appendOLAPGroupByState(tdsState.
|
|
373
|
+
appendOLAPGroupByState(tdsState.windowState, lambdaFunction);
|
|
372
374
|
|
|
373
375
|
// build post-filter
|
|
374
376
|
appendPostFilter(tdsState.postFilterState, lambdaFunction);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type { QueryBuilderTDS_WindowOperator } from './operators/QueryBuilderTDS_WindowOperator.js';
|
|
18
|
+
import { QueryBuilderTDS_WindowRankOperator_AverageRank } from './operators/QueryBuilderTDS_WindowRankOperator_AverageRank.js';
|
|
19
|
+
import { QueryBuilderTDS_WindowRankOperator_DenseRank } from './operators/QueryBuilderTDS_WindowRankOperator_DenseRank.js';
|
|
20
|
+
import { QueryBuilderTDS_WindowRankOperator_Rank } from './operators/QueryBuilderTDS_WindowRankOperator_Rank.js';
|
|
21
|
+
import { QueryBuilderTDS_WindowRankOperator_RowNumber } from './operators/QueryBuilderTDS_WindowRankOperator_RowNumber.js';
|
|
22
|
+
import { QueryBuilderTDS_WindowOperator_Sum } from './operators/QueryBuilderTDS_WindowOperator_Sum.js';
|
|
23
|
+
import { QueryBuilderTDS_WindowOperator_Count } from './operators/QueryBuilderTDS_WindowOperator_Count.js';
|
|
24
|
+
import { QueryBuilderTDS_WindowOperator_Max } from './operators/QueryBuilderTDS_WindowOperator_Max.js';
|
|
25
|
+
import { QueryBuilderTDS_WindowOperator_Min } from './operators/QueryBuilderTDS_WindowOperator_Min.js';
|
|
26
|
+
import { QueryBuilderTDS_WindowOperator_Average } from './operators/QueryBuilderTDS_WindowOperator_Average.js';
|
|
27
|
+
|
|
28
|
+
export const getQueryBuilderCoreWindowOperators =
|
|
29
|
+
(): QueryBuilderTDS_WindowOperator[] => [
|
|
30
|
+
new QueryBuilderTDS_WindowOperator_Sum(),
|
|
31
|
+
new QueryBuilderTDS_WindowOperator_Count(),
|
|
32
|
+
new QueryBuilderTDS_WindowOperator_Max(),
|
|
33
|
+
new QueryBuilderTDS_WindowOperator_Min(),
|
|
34
|
+
new QueryBuilderTDS_WindowOperator_Average(),
|
|
35
|
+
new QueryBuilderTDS_WindowRankOperator_AverageRank(),
|
|
36
|
+
new QueryBuilderTDS_WindowRankOperator_DenseRank(),
|
|
37
|
+
new QueryBuilderTDS_WindowRankOperator_Rank(),
|
|
38
|
+
new QueryBuilderTDS_WindowRankOperator_RowNumber(),
|
|
39
|
+
];
|