@finos/legend-query-builder 4.17.100 → 4.18.1
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/__test__.d.ts +1 -0
- package/lib/__test__.d.ts.map +1 -1
- package/lib/__test__.js +1 -0
- package/lib/__test__.js.map +1 -1
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +2 -1
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +9 -8
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts +5 -0
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js +28 -2
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js +48 -5
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
- package/lib/components/explorer/QueryBuilderRelationExplorerPanel.d.ts +24 -0
- package/lib/components/explorer/QueryBuilderRelationExplorerPanel.d.ts.map +1 -0
- package/lib/components/explorer/QueryBuilderRelationExplorerPanel.js +202 -0
- package/lib/components/explorer/QueryBuilderRelationExplorerPanel.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +3 -3
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +25 -6
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +8 -2
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -1
- package/lib/components/workflows/AccessorQueryBuilder.d.ts +18 -0
- package/lib/components/workflows/AccessorQueryBuilder.d.ts.map +1 -0
- package/lib/components/workflows/AccessorQueryBuilder.js +87 -0
- package/lib/components/workflows/AccessorQueryBuilder.js.map +1 -0
- package/lib/components/workflows/ClassQueryBuilder.js +5 -5
- package/lib/components/workflows/ClassQueryBuilder.js.map +1 -1
- package/lib/components/workflows/DataProductQueryBuilder.d.ts.map +1 -1
- package/lib/components/workflows/DataProductQueryBuilder.js +13 -12
- package/lib/components/workflows/DataProductQueryBuilder.js.map +1 -1
- package/lib/data-access-overview.css +1 -1
- package/lib/graph/QueryBuilderMetaModelConst.d.ts +6 -0
- package/lib/graph/QueryBuilderMetaModelConst.d.ts.map +1 -1
- package/lib/graph/QueryBuilderMetaModelConst.js +6 -0
- package/lib/graph/QueryBuilderMetaModelConst.js.map +1 -1
- package/lib/graph-manager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js +7 -1
- package/lib/graph-manager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts +2 -0
- package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js +93 -3
- package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/QueryBuilderConfig.d.ts +3 -0
- package/lib/stores/QueryBuilderConfig.d.ts.map +1 -1
- package/lib/stores/QueryBuilderConfig.js +3 -0
- package/lib/stores/QueryBuilderConfig.js.map +1 -1
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +6 -2
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts +14 -4
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +41 -13
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.d.ts +2 -1
- package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.js +51 -20
- package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderStateHashUtils.d.ts +2 -0
- package/lib/stores/QueryBuilderStateHashUtils.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateHashUtils.js +2 -0
- package/lib/stores/QueryBuilderStateHashUtils.js.map +1 -1
- package/lib/stores/QueryBuilderTypeaheadHelper.js +6 -6
- package/lib/stores/QueryBuilderTypeaheadHelper.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js +54 -45
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.js +2 -2
- package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
- package/lib/stores/__test-utils__/QueryBuilderStateTestUtils.js +1 -1
- package/lib/stores/__test-utils__/QueryBuilderStateTestUtils.js.map +1 -1
- package/lib/stores/__test-utils__/TEST_DATA__QueryBuilder_Accessors.d.ts +374 -0
- package/lib/stores/__test-utils__/TEST_DATA__QueryBuilder_Accessors.d.ts.map +1 -0
- package/lib/stores/__test-utils__/TEST_DATA__QueryBuilder_Accessors.js +625 -0
- package/lib/stores/__test-utils__/TEST_DATA__QueryBuilder_Accessors.js.map +1 -0
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts +12 -2
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.js +12 -2
- package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +2 -2
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts +2 -2
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +4 -3
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.d.ts +2 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.js +19 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +7 -4
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +61 -13
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderRelationAggregationValueSpecBuilder.js +2 -2
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderRelationAggregationValueSpecBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.d.ts +16 -3
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js +102 -24
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts +2 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js +16 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.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 +11 -9
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderRelationProjectValueSpecBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderRelationProjectValueSpecBuilder.js +12 -3
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderRelationProjectValueSpecBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderTypedProjectionStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderTypedProjectionStateBuilder.js +16 -12
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderTypedProjectionStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowGroupByOperatorLoader.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowGroupByOperatorLoader.js +2 -0
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowGroupByOperatorLoader.js.map +1 -1
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowState.d.ts +4 -3
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowState.js +19 -9
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowStateBuilder.d.ts +1 -0
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowStateBuilder.js +83 -5
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowValueSpecificationBuilder.d.ts +4 -3
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowValueSpecificationBuilder.js +130 -9
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator.d.ts +2 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator.js.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Average.d.ts +1 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Average.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Average.js +3 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Average.js.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Count.d.ts +1 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Count.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Count.js +3 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Count.js.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Max.d.ts +1 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Max.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Max.js +3 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Max.js.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Min.d.ts +1 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Min.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Min.js +3 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Min.js.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_PercentRank.d.ts +25 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_PercentRank.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_PercentRank.js +54 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_PercentRank.js.map +1 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Sum.d.ts +1 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Sum.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Sum.js +3 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Sum.js.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_AverageRank.d.ts +1 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_AverageRank.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_AverageRank.js +4 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_AverageRank.js.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_DenseRank.d.ts +1 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_DenseRank.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_DenseRank.js +3 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_DenseRank.js.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_Rank.d.ts +1 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_Rank.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_Rank.js +3 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_Rank.js.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.d.ts +1 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.js +3 -0
- package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js +3 -3
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningState.js +4 -4
- package/lib/stores/milestoning/QueryBuilderMilestoningState.js.map +1 -1
- package/lib/stores/workflows/MappingQueryBuilderState.js +2 -2
- package/lib/stores/workflows/MappingQueryBuilderState.js.map +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js +2 -2
- package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -1
- package/lib/stores/workflows/accessor/AccessorQueryBuilderHelper.d.ts +18 -0
- package/lib/stores/workflows/accessor/AccessorQueryBuilderHelper.d.ts.map +1 -0
- package/lib/stores/workflows/accessor/AccessorQueryBuilderHelper.js +32 -0
- package/lib/stores/workflows/accessor/AccessorQueryBuilderHelper.js.map +1 -0
- package/lib/stores/workflows/accessor/AccessorQueryBuilderState.d.ts +58 -0
- package/lib/stores/workflows/accessor/AccessorQueryBuilderState.d.ts.map +1 -0
- package/lib/stores/workflows/accessor/AccessorQueryBuilderState.js +129 -0
- package/lib/stores/workflows/accessor/AccessorQueryBuilderState.js.map +1 -0
- package/lib/stores/workflows/dataProduct/DataProductQueryBuilderState.d.ts +31 -6
- package/lib/stores/workflows/dataProduct/DataProductQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/workflows/dataProduct/DataProductQueryBuilderState.js +164 -17
- package/lib/stores/workflows/dataProduct/DataProductQueryBuilderState.js.map +1 -1
- package/package.json +7 -7
- package/src/__test__.ts +1 -0
- package/src/components/QueryBuilder.tsx +2 -1
- package/src/components/QueryBuilderSideBar.tsx +12 -8
- package/src/components/__test-utils__/QueryBuilderComponentTestUtils.tsx +73 -1
- package/src/components/explorer/QueryBuilderExplorerPanel.tsx +77 -14
- package/src/components/explorer/QueryBuilderRelationExplorerPanel.tsx +536 -0
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +1 -0
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +3 -3
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +62 -4
- package/src/components/fetch-structure/QueryBuilderTDSWindowPanel.tsx +10 -4
- package/src/components/workflows/AccessorQueryBuilder.tsx +211 -0
- package/src/components/workflows/ClassQueryBuilder.tsx +5 -5
- package/src/components/workflows/DataProductQueryBuilder.tsx +40 -62
- package/src/graph/QueryBuilderMetaModelConst.ts +7 -0
- package/src/graph-manager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.ts +28 -0
- package/src/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.ts +223 -4
- package/src/index.ts +5 -0
- package/src/stores/QueryBuilderConfig.ts +3 -0
- package/src/stores/QueryBuilderResultState.ts +12 -8
- package/src/stores/QueryBuilderState.ts +47 -12
- package/src/stores/QueryBuilderStateBuilder.ts +107 -43
- package/src/stores/QueryBuilderStateHashUtils.ts +2 -0
- package/src/stores/QueryBuilderTypeaheadHelper.ts +6 -6
- package/src/stores/QueryBuilderValueSpecificationBuilder.ts +72 -59
- package/src/stores/QueryBuilderValueSpecificationHelper.ts +5 -3
- package/src/stores/__test-utils__/QueryBuilderStateTestUtils.ts +1 -1
- package/src/stores/__test-utils__/TEST_DATA__QueryBuilder_Accessors.ts +630 -0
- package/src/stores/explorer/QueryBuilderExplorerState.ts +26 -2
- package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +1 -2
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +4 -3
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.ts +1 -1
- package/src/stores/fetch-structure/tds/QueryBuilderTDSHelper.ts +42 -0
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +137 -20
- package/src/stores/fetch-structure/tds/aggregation/QueryBuilderRelationAggregationValueSpecBuilder.ts +2 -2
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.ts +1 -1
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.ts +197 -38
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.ts +30 -0
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +11 -9
- package/src/stores/fetch-structure/tds/projection/QueryBuilderRelationProjectValueSpecBuilder.ts +22 -1
- package/src/stores/fetch-structure/tds/projection/QueryBuilderTypedProjectionStateBuilder.ts +25 -16
- package/src/stores/fetch-structure/tds/window/QueryBuilderWindowGroupByOperatorLoader.ts +2 -0
- package/src/stores/fetch-structure/tds/window/QueryBuilderWindowState.ts +23 -9
- package/src/stores/fetch-structure/tds/window/QueryBuilderWindowStateBuilder.ts +206 -4
- package/src/stores/fetch-structure/tds/window/QueryBuilderWindowValueSpecificationBuilder.ts +250 -12
- package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator.ts +3 -1
- package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Average.ts +4 -0
- package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Count.ts +4 -0
- package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Max.ts +4 -0
- package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Min.ts +4 -0
- package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_PercentRank.ts +57 -0
- package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Sum.ts +4 -0
- package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_AverageRank.ts +5 -0
- package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_DenseRank.ts +4 -0
- package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_Rank.ts +4 -0
- package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.ts +4 -0
- package/src/stores/filter/QueryBuilderFilterValueSpecificationBuilder.ts +3 -3
- package/src/stores/milestoning/QueryBuilderMilestoningState.ts +4 -4
- package/src/stores/workflows/MappingQueryBuilderState.ts +2 -2
- package/src/stores/workflows/ServiceQueryBuilderState.ts +2 -2
- package/src/stores/workflows/accessor/AccessorQueryBuilderHelper.ts +51 -0
- package/src/stores/workflows/accessor/AccessorQueryBuilderState.ts +200 -0
- package/src/stores/workflows/dataProduct/DataProductQueryBuilderState.ts +277 -26
- package/tsconfig.json +6 -0
|
@@ -0,0 +1,200 @@
|
|
|
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 {
|
|
18
|
+
type GraphManagerState,
|
|
19
|
+
type PackageableRuntime,
|
|
20
|
+
type AccessorOwner,
|
|
21
|
+
type Accessor,
|
|
22
|
+
IngestDefinition,
|
|
23
|
+
Database,
|
|
24
|
+
PackageableElementExplicitReference,
|
|
25
|
+
RuntimePointer,
|
|
26
|
+
type TEMPORARY_IngestContent,
|
|
27
|
+
} from '@finos/legend-graph';
|
|
28
|
+
import { QueryBuilderState } from '../../QueryBuilderState.js';
|
|
29
|
+
import type { GenericLegendApplicationStore } from '@finos/legend-application';
|
|
30
|
+
import type {
|
|
31
|
+
QueryBuilderWorkflowState,
|
|
32
|
+
QueryBuilderActionConfig,
|
|
33
|
+
} from '../../query-workflow/QueryBuilderWorkFlowState.js';
|
|
34
|
+
import type { QueryBuilderConfig } from '../../../graph-manager/QueryBuilderConfig.js';
|
|
35
|
+
import { renderAccessorQueryBuilderSetupPanelContent } from '../../../components/workflows/AccessorQueryBuilder.js';
|
|
36
|
+
import { action, computed, makeObservable } from 'mobx';
|
|
37
|
+
import type { QueryableSourceInfo } from '@finos/legend-storage';
|
|
38
|
+
import { buildElementOption } from '@finos/legend-lego/graph-editor';
|
|
39
|
+
import { getCompatibleRuntimesFromAccessorOwner } from './AccessorQueryBuilderHelper.js';
|
|
40
|
+
import { QueryBuilderEmbeddedFromExecutionContextState } from '../../QueryBuilderExecutionContextState.js';
|
|
41
|
+
import { QueryBuilderTDSState } from '../../fetch-structure/tds/QueryBuilderTDSState.js';
|
|
42
|
+
|
|
43
|
+
export interface AccessorOwnerOption {
|
|
44
|
+
label: string;
|
|
45
|
+
value: AccessorOwner;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export class AccessorQueryBuilderState extends QueryBuilderState {
|
|
49
|
+
override TEMPORARY__setupPanelContentRenderer = (): React.ReactNode =>
|
|
50
|
+
renderAccessorQueryBuilderSetupPanelContent(this);
|
|
51
|
+
|
|
52
|
+
constructor(
|
|
53
|
+
applicationStore: GenericLegendApplicationStore,
|
|
54
|
+
accessor: Accessor | undefined,
|
|
55
|
+
graphManagerState: GraphManagerState,
|
|
56
|
+
workflow: QueryBuilderWorkflowState,
|
|
57
|
+
actionConfig: QueryBuilderActionConfig,
|
|
58
|
+
config?: QueryBuilderConfig | undefined,
|
|
59
|
+
sourceInfo?: QueryableSourceInfo | undefined,
|
|
60
|
+
) {
|
|
61
|
+
super(applicationStore, graphManagerState, workflow, config, sourceInfo);
|
|
62
|
+
makeObservable(this, {
|
|
63
|
+
changeAccessorOwner: action,
|
|
64
|
+
changeAccessor: action,
|
|
65
|
+
accessorOwnerOptions: computed,
|
|
66
|
+
accessorLabel: computed,
|
|
67
|
+
compatibleRuntimes: computed,
|
|
68
|
+
});
|
|
69
|
+
this.workflowState.updateActionConfig(actionConfig);
|
|
70
|
+
if (accessor) {
|
|
71
|
+
this.changeSourceElement(accessor);
|
|
72
|
+
}
|
|
73
|
+
this.configureFilterPanelsForAccessor();
|
|
74
|
+
// force from.
|
|
75
|
+
this.executionContextState =
|
|
76
|
+
new QueryBuilderEmbeddedFromExecutionContextState(this);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// we will not include data product as it is own state
|
|
80
|
+
get accessorOwners(): AccessorOwner[] {
|
|
81
|
+
return [
|
|
82
|
+
...this.graphManagerState.graph.ingests,
|
|
83
|
+
...this.graphManagerState.usableDatabases,
|
|
84
|
+
];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
get accessorLabel(): string {
|
|
88
|
+
return this.sourceAccessor?.accessorLabel ?? 'Accessor';
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
get accessorOwnerOptions(): AccessorOwnerOption[] {
|
|
92
|
+
return this.accessorOwners.map(buildElementOption);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
get selectedAccessorOwner(): AccessorOwner | undefined {
|
|
96
|
+
return this.sourceAccessor?.parentElement;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
get accessors(): {
|
|
100
|
+
schemaName?: string | undefined;
|
|
101
|
+
tableName: string;
|
|
102
|
+
}[] {
|
|
103
|
+
if (this.selectedAccessorOwner instanceof IngestDefinition) {
|
|
104
|
+
const content = this.selectedAccessorOwner
|
|
105
|
+
.content as unknown as TEMPORARY_IngestContent;
|
|
106
|
+
return (
|
|
107
|
+
content.datasets?.map((e) => ({
|
|
108
|
+
tableName: e.name,
|
|
109
|
+
})) ?? []
|
|
110
|
+
);
|
|
111
|
+
} else if (this.selectedAccessorOwner instanceof Database) {
|
|
112
|
+
return this.selectedAccessorOwner.schemas.flatMap((schema) =>
|
|
113
|
+
schema.tables.map((table) => ({
|
|
114
|
+
schemaName: schema.name,
|
|
115
|
+
tableName: table.name,
|
|
116
|
+
})),
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
return [];
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
get accessorsOptions(): {
|
|
123
|
+
label: string;
|
|
124
|
+
value: { schemaName?: string | undefined; tableName: string };
|
|
125
|
+
}[] {
|
|
126
|
+
return this.accessors.map((accessor) => ({
|
|
127
|
+
label: accessor.schemaName
|
|
128
|
+
? `${accessor.schemaName}.${accessor.tableName}`
|
|
129
|
+
: accessor.tableName,
|
|
130
|
+
value: accessor,
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
get compatibleRuntimes(): PackageableRuntime[] {
|
|
135
|
+
const owner = this.selectedAccessorOwner;
|
|
136
|
+
if (!owner) {
|
|
137
|
+
return [];
|
|
138
|
+
}
|
|
139
|
+
return getCompatibleRuntimesFromAccessorOwner(
|
|
140
|
+
owner,
|
|
141
|
+
this.graphManagerState,
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
override get requiresMappingForExecution(): boolean {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* In accessor mode, the filter panel does not support relation columns,
|
|
151
|
+
* so we hide it and show the post-filter panel instead.
|
|
152
|
+
*/
|
|
153
|
+
private configureFilterPanelsForAccessor(): void {
|
|
154
|
+
this.filterState.setShowPanel(false);
|
|
155
|
+
const tdsState = this.fetchStructureState.implementation;
|
|
156
|
+
if (tdsState instanceof QueryBuilderTDSState) {
|
|
157
|
+
tdsState.setShowPostFilterPanel(true);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
changeAccessorOwner(accessorOwner: AccessorOwner): void {
|
|
162
|
+
const accessor =
|
|
163
|
+
this.graphManagerState.graphManager.createAccessorFromPackageableElement(
|
|
164
|
+
accessorOwner,
|
|
165
|
+
this.graphManagerState.graph,
|
|
166
|
+
);
|
|
167
|
+
if (accessor) {
|
|
168
|
+
this.changeSourceElement(accessor);
|
|
169
|
+
this.configureFilterPanelsForAccessor();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
changeAccessor(value: {
|
|
174
|
+
schemaName?: string | undefined;
|
|
175
|
+
tableName: string;
|
|
176
|
+
}): void {
|
|
177
|
+
const owner = this.selectedAccessorOwner;
|
|
178
|
+
if (owner) {
|
|
179
|
+
const accessor =
|
|
180
|
+
this.graphManagerState.graphManager.createAccessorFromPackageableElement(
|
|
181
|
+
owner,
|
|
182
|
+
this.graphManagerState.graph,
|
|
183
|
+
{
|
|
184
|
+
schemaName: value.schemaName,
|
|
185
|
+
tableName: value.tableName,
|
|
186
|
+
},
|
|
187
|
+
);
|
|
188
|
+
if (accessor) {
|
|
189
|
+
this.changeSourceElement(accessor);
|
|
190
|
+
this.configureFilterPanelsForAccessor();
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
changeSelectedRuntime(val: PackageableRuntime): void {
|
|
196
|
+
this.changeRuntime(
|
|
197
|
+
new RuntimePointer(PackageableElementExplicitReference.create(val)),
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
@@ -40,8 +40,19 @@ import {
|
|
|
40
40
|
type QueryExecutionContext,
|
|
41
41
|
QueryDataProductNativeExecutionContext,
|
|
42
42
|
QueryDataProductModelAccessExecutionContext,
|
|
43
|
+
QueryDataProductLakehouseExecutionContext,
|
|
44
|
+
LakehouseAccessPoint,
|
|
43
45
|
type RawLambda,
|
|
44
46
|
buildRawLambdaFromLambdaFunction,
|
|
47
|
+
type Accessor,
|
|
48
|
+
type RelationTypeMetadata,
|
|
49
|
+
DataProductAccessor,
|
|
50
|
+
RelationType,
|
|
51
|
+
RelationColumn,
|
|
52
|
+
GenericType,
|
|
53
|
+
GenericTypeExplicitReference,
|
|
54
|
+
findLakehouseAccessPointGroup,
|
|
55
|
+
type PureModel,
|
|
45
56
|
} from '@finos/legend-graph';
|
|
46
57
|
import { QueryBuilderState } from '../../QueryBuilderState.js';
|
|
47
58
|
|
|
@@ -68,6 +79,35 @@ import { compareLabelFn } from '@finos/legend-art';
|
|
|
68
79
|
import { QueryBuilderEmbeddedFromExecutionContextState } from '../../QueryBuilderExecutionContextState.js';
|
|
69
80
|
import { buildLambdaFunction } from '../../QueryBuilderValueSpecificationBuilder.js';
|
|
70
81
|
|
|
82
|
+
export const buildDataProductAccessor = (
|
|
83
|
+
relationMetadata: RelationTypeMetadata,
|
|
84
|
+
dataProduct: DataProduct,
|
|
85
|
+
accessPoint: LakehouseAccessPoint,
|
|
86
|
+
graph: PureModel,
|
|
87
|
+
): DataProductAccessor => {
|
|
88
|
+
const relationType = new RelationType(accessPoint.title ?? accessPoint.id);
|
|
89
|
+
relationType.columns = relationMetadata.columns.map(
|
|
90
|
+
(col) =>
|
|
91
|
+
new RelationColumn(
|
|
92
|
+
col.name,
|
|
93
|
+
GenericTypeExplicitReference.create(
|
|
94
|
+
new GenericType(graph.getType(col.type)),
|
|
95
|
+
),
|
|
96
|
+
),
|
|
97
|
+
);
|
|
98
|
+
const groupResult = findLakehouseAccessPointGroup(
|
|
99
|
+
dataProduct,
|
|
100
|
+
accessPoint.id,
|
|
101
|
+
);
|
|
102
|
+
return new DataProductAccessor(
|
|
103
|
+
dataProduct.path,
|
|
104
|
+
groupResult?.group.id,
|
|
105
|
+
accessPoint.id,
|
|
106
|
+
relationType,
|
|
107
|
+
dataProduct,
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
|
+
|
|
71
111
|
export type DataProductOption = {
|
|
72
112
|
label: string;
|
|
73
113
|
value: DepotEntityWithOrigin;
|
|
@@ -104,6 +144,15 @@ export const buildModelAccessPointGroupOption = (
|
|
|
104
144
|
value,
|
|
105
145
|
});
|
|
106
146
|
|
|
147
|
+
export type ExecutionIdOption = {
|
|
148
|
+
label: string;
|
|
149
|
+
tag: string;
|
|
150
|
+
value:
|
|
151
|
+
| NativeModelExecutionContext
|
|
152
|
+
| ModelAccessPointGroup
|
|
153
|
+
| LakehouseAccessPoint;
|
|
154
|
+
};
|
|
155
|
+
|
|
107
156
|
export abstract class DataProductExecutionState<T> {
|
|
108
157
|
readonly queryBuilderState: DataProductQueryBuilderState;
|
|
109
158
|
exectionValue: T;
|
|
@@ -118,10 +167,14 @@ export abstract class DataProductExecutionState<T> {
|
|
|
118
167
|
|
|
119
168
|
abstract get label(): string;
|
|
120
169
|
|
|
121
|
-
abstract get mapping(): Mapping;
|
|
170
|
+
abstract get mapping(): Mapping | undefined;
|
|
122
171
|
|
|
123
172
|
abstract get featuredElements(): DataProductElementScope[] | undefined;
|
|
124
173
|
|
|
174
|
+
get showRuntimeOptions(): boolean {
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
177
|
+
|
|
125
178
|
get selectedOption(): { label: string; value: T } {
|
|
126
179
|
return {
|
|
127
180
|
label: this.label,
|
|
@@ -196,7 +249,7 @@ export class ModelAccessPointDataProductExecutionState extends DataProductExecut
|
|
|
196
249
|
return this.exectionValue.featuredElements;
|
|
197
250
|
}
|
|
198
251
|
|
|
199
|
-
get showRuntimeOptions(): boolean {
|
|
252
|
+
override get showRuntimeOptions(): boolean {
|
|
200
253
|
return this.compatibleRuntimes.length > 1;
|
|
201
254
|
}
|
|
202
255
|
|
|
@@ -207,6 +260,46 @@ export class ModelAccessPointDataProductExecutionState extends DataProductExecut
|
|
|
207
260
|
}
|
|
208
261
|
}
|
|
209
262
|
|
|
263
|
+
export class LakehouseDataProductExecutionState extends DataProductExecutionState<LakehouseAccessPoint> {
|
|
264
|
+
selectedRuntime: PackageableRuntime | undefined;
|
|
265
|
+
adhocRuntime = false;
|
|
266
|
+
constructor(
|
|
267
|
+
executionState: LakehouseAccessPoint,
|
|
268
|
+
queryBuilderState: DataProductQueryBuilderState,
|
|
269
|
+
) {
|
|
270
|
+
super(executionState, queryBuilderState);
|
|
271
|
+
makeObservable(this, {});
|
|
272
|
+
this.selectedRuntime = this.compatibleRuntimes[0];
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
changeSelectedRuntime(val: PackageableRuntime): void {
|
|
276
|
+
this.selectedRuntime = val;
|
|
277
|
+
this.queryBuilderState.changeRuntime(val);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
override get label(): string {
|
|
281
|
+
return this.exectionValue.title ?? this.exectionValue.id;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
get mapping(): Mapping | undefined {
|
|
285
|
+
return undefined;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
get featuredElements(): DataProductElementScope[] | undefined {
|
|
289
|
+
return undefined;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
get compatibleRuntimes(): PackageableRuntime[] {
|
|
293
|
+
return this.queryBuilderState.graphManagerState.usableRuntimes.filter(
|
|
294
|
+
(runtime) => runtime.runtimeValue instanceof LakehouseRuntime,
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
override get showRuntimeOptions(): boolean {
|
|
299
|
+
return this.compatibleRuntimes.length > 1;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
210
303
|
export class DataProductQueryBuilderState extends QueryBuilderState {
|
|
211
304
|
readonly onClassChange?: ((val: Class) => void) | undefined;
|
|
212
305
|
readonly onDataProductChange?: (val: DepotEntityWithOrigin) => Promise<void>;
|
|
@@ -218,7 +311,7 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
|
|
|
218
311
|
dataProduct: DataProduct;
|
|
219
312
|
dataProductArtifact: V1_DataProductArtifact | undefined;
|
|
220
313
|
executionState: DataProductExecutionState<
|
|
221
|
-
NativeModelExecutionContext | ModelAccessPointGroup
|
|
314
|
+
NativeModelExecutionContext | ModelAccessPointGroup | LakehouseAccessPoint
|
|
222
315
|
>;
|
|
223
316
|
entities: DepotEntityWithOrigin[] | undefined;
|
|
224
317
|
|
|
@@ -234,7 +327,10 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
|
|
|
234
327
|
dataProduct: DataProduct,
|
|
235
328
|
artifact: V1_DataProductArtifact | undefined,
|
|
236
329
|
actionConfig: QueryBuilderActionConfig,
|
|
237
|
-
executionState:
|
|
330
|
+
executionState:
|
|
331
|
+
| NativeModelExecutionContext
|
|
332
|
+
| ModelAccessPointGroup
|
|
333
|
+
| LakehouseAccessPoint,
|
|
238
334
|
prioritizeEntityFunc: ((val: DepotEntityWithOrigin) => boolean) | undefined,
|
|
239
335
|
onDataProductChange: (val: DepotEntityWithOrigin) => Promise<void>,
|
|
240
336
|
onExecutionContextChange?:
|
|
@@ -255,8 +351,12 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
|
|
|
255
351
|
isProductLinkable: computed,
|
|
256
352
|
isNativeMode: computed,
|
|
257
353
|
isModelAccessPointGroupMode: computed,
|
|
354
|
+
isLakehouseMode: computed,
|
|
258
355
|
showExecutionContextOptions: computed,
|
|
259
356
|
showModelAccessPointGroupSelector: computed,
|
|
357
|
+
showExecutionIdSelector: computed,
|
|
358
|
+
executionIdOptions: computed,
|
|
359
|
+
selectedExecutionIdOption: computed,
|
|
260
360
|
selectedExecOption: computed,
|
|
261
361
|
selectedModelAccessPointGroupOption: computed,
|
|
262
362
|
usableClasses: computed,
|
|
@@ -277,11 +377,16 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
|
|
|
277
377
|
this.executionState =
|
|
278
378
|
executionState instanceof NativeModelExecutionContext
|
|
279
379
|
? new NativeModelDataProductExecutionState(executionState, this)
|
|
280
|
-
:
|
|
380
|
+
: executionState instanceof LakehouseAccessPoint
|
|
381
|
+
? new LakehouseDataProductExecutionState(executionState, this)
|
|
382
|
+
: new ModelAccessPointDataProductExecutionState(executionState, this);
|
|
281
383
|
this.prioritizeEntityFunc = prioritizeEntityFunc;
|
|
282
384
|
this.onDataProductChange = onDataProductChange;
|
|
283
385
|
this.onExecutionContextChange = onExecutionContextChange;
|
|
284
386
|
this.onClassChange = onClassChange;
|
|
387
|
+
// force from.
|
|
388
|
+
this.executionContextState =
|
|
389
|
+
new QueryBuilderEmbeddedFromExecutionContextState(this);
|
|
285
390
|
}
|
|
286
391
|
|
|
287
392
|
get isProductLinkable(): boolean {
|
|
@@ -298,6 +403,10 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
|
|
|
298
403
|
);
|
|
299
404
|
}
|
|
300
405
|
|
|
406
|
+
get isLakehouseMode(): boolean {
|
|
407
|
+
return this.executionState instanceof LakehouseDataProductExecutionState;
|
|
408
|
+
}
|
|
409
|
+
|
|
301
410
|
get showExecutionContextOptions(): boolean {
|
|
302
411
|
return this.isNativeMode && this.execOptions.length > 1;
|
|
303
412
|
}
|
|
@@ -309,6 +418,75 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
|
|
|
309
418
|
);
|
|
310
419
|
}
|
|
311
420
|
|
|
421
|
+
get executionIdOptions(): ExecutionIdOption[] {
|
|
422
|
+
const nativeOptions: ExecutionIdOption[] = (
|
|
423
|
+
this.dataProduct.nativeModelAccess?.nativeModelExecutionContexts ?? []
|
|
424
|
+
).map((ctx) => ({
|
|
425
|
+
label: ctx.key,
|
|
426
|
+
tag: 'Native',
|
|
427
|
+
value: ctx,
|
|
428
|
+
}));
|
|
429
|
+
const modelOptions: ExecutionIdOption[] = this.modelAccessPointGroups.map(
|
|
430
|
+
(group) => ({
|
|
431
|
+
label: group.title ?? group.id,
|
|
432
|
+
tag: 'Model',
|
|
433
|
+
value: group,
|
|
434
|
+
}),
|
|
435
|
+
);
|
|
436
|
+
const lakehouseOptions: ExecutionIdOption[] =
|
|
437
|
+
this.dataProduct.accessPointGroups
|
|
438
|
+
.flatMap((group) => group.accessPoints)
|
|
439
|
+
.filter(filterByType(LakehouseAccessPoint))
|
|
440
|
+
.map((ap) => ({
|
|
441
|
+
label: ap.title ?? ap.id,
|
|
442
|
+
tag: 'Lakehouse',
|
|
443
|
+
value: ap,
|
|
444
|
+
}));
|
|
445
|
+
return [...modelOptions, ...lakehouseOptions, ...nativeOptions].sort(
|
|
446
|
+
compareLabelFn,
|
|
447
|
+
);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
get selectedExecutionIdOption(): ExecutionIdOption | undefined {
|
|
451
|
+
const state = this.executionState;
|
|
452
|
+
if (state instanceof NativeModelDataProductExecutionState) {
|
|
453
|
+
return {
|
|
454
|
+
label: state.exectionValue.key,
|
|
455
|
+
tag: 'Native',
|
|
456
|
+
value: state.exectionValue,
|
|
457
|
+
};
|
|
458
|
+
} else if (state instanceof ModelAccessPointDataProductExecutionState) {
|
|
459
|
+
return {
|
|
460
|
+
label: state.exectionValue.title ?? state.exectionValue.id,
|
|
461
|
+
tag: 'Model',
|
|
462
|
+
value: state.exectionValue,
|
|
463
|
+
};
|
|
464
|
+
} else if (state instanceof LakehouseDataProductExecutionState) {
|
|
465
|
+
return {
|
|
466
|
+
label: state.exectionValue.title ?? state.exectionValue.id,
|
|
467
|
+
tag: 'Lakehouse',
|
|
468
|
+
value: state.exectionValue,
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
return undefined;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
get showExecutionIdSelector(): boolean {
|
|
475
|
+
return this.executionIdOptions.length > 1;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
async changeExecutionId(option: ExecutionIdOption): Promise<void> {
|
|
479
|
+
const val = option.value;
|
|
480
|
+
if (val === this.executionState.exectionValue) {
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
await this.changeExecutionState(val);
|
|
484
|
+
await this.propagateExecutionContextChange();
|
|
485
|
+
if (val instanceof NativeModelExecutionContext) {
|
|
486
|
+
this.onExecutionContextChange?.(val);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
312
490
|
get selectedExecOption():
|
|
313
491
|
| { label: string; value: NativeModelExecutionContext }
|
|
314
492
|
| undefined {
|
|
@@ -317,6 +495,13 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
|
|
|
317
495
|
: undefined;
|
|
318
496
|
}
|
|
319
497
|
|
|
498
|
+
override get requiresMappingForExecution(): boolean {
|
|
499
|
+
if (this.executionState instanceof LakehouseDataProductExecutionState) {
|
|
500
|
+
return false;
|
|
501
|
+
}
|
|
502
|
+
return true;
|
|
503
|
+
}
|
|
504
|
+
|
|
320
505
|
get selectedModelAccessPointGroupOption():
|
|
321
506
|
| ModelAccessPointGroupOption
|
|
322
507
|
| undefined {
|
|
@@ -390,6 +575,13 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
|
|
|
390
575
|
execContext.dataProductPath = this.dataProduct.path;
|
|
391
576
|
execContext.accessPointGroupId = this.executionState.exectionValue.id;
|
|
392
577
|
return execContext;
|
|
578
|
+
} else if (
|
|
579
|
+
this.executionState instanceof LakehouseDataProductExecutionState
|
|
580
|
+
) {
|
|
581
|
+
const execContext = new QueryDataProductLakehouseExecutionContext();
|
|
582
|
+
execContext.dataProductPath = this.dataProduct.path;
|
|
583
|
+
execContext.accessPointId = this.executionState.exectionValue.id;
|
|
584
|
+
return execContext;
|
|
393
585
|
}
|
|
394
586
|
return super.getQueryExecutionContext();
|
|
395
587
|
}
|
|
@@ -403,7 +595,7 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
|
|
|
403
595
|
val.path,
|
|
404
596
|
);
|
|
405
597
|
if (dataProduct) {
|
|
406
|
-
this.initWithDataProduct(dataProduct);
|
|
598
|
+
this.initWithDataProduct(dataProduct, undefined, undefined);
|
|
407
599
|
this.loadDataProductModelState.pass();
|
|
408
600
|
} else if (this.onDataProductChange) {
|
|
409
601
|
// data product not in current graph — trigger full rebuild
|
|
@@ -430,7 +622,11 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
|
|
|
430
622
|
|
|
431
623
|
initWithDataProduct(
|
|
432
624
|
dataProduct: DataProduct,
|
|
433
|
-
|
|
625
|
+
accessor: Accessor | undefined,
|
|
626
|
+
preResolvedState?:
|
|
627
|
+
| NativeModelExecutionContext
|
|
628
|
+
| ModelAccessPointGroup
|
|
629
|
+
| LakehouseAccessPoint,
|
|
434
630
|
): void {
|
|
435
631
|
try {
|
|
436
632
|
const execValue =
|
|
@@ -439,8 +635,13 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
|
|
|
439
635
|
this.executionState =
|
|
440
636
|
execValue instanceof NativeModelExecutionContext
|
|
441
637
|
? new NativeModelDataProductExecutionState(execValue, this)
|
|
442
|
-
:
|
|
443
|
-
|
|
638
|
+
: execValue instanceof LakehouseAccessPoint
|
|
639
|
+
? new LakehouseDataProductExecutionState(execValue, this)
|
|
640
|
+
: new ModelAccessPointDataProductExecutionState(execValue, this);
|
|
641
|
+
const mapping = this.executionState.mapping;
|
|
642
|
+
if (mapping) {
|
|
643
|
+
this.changeMapping(mapping);
|
|
644
|
+
}
|
|
444
645
|
if (this.executionState instanceof NativeModelDataProductExecutionState) {
|
|
445
646
|
const runtime = guaranteeNonNullable(
|
|
446
647
|
this.executionState.exectionValue.runtime,
|
|
@@ -453,19 +654,37 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
|
|
|
453
654
|
this.executionState.selectedRuntime instanceof PackageableRuntime
|
|
454
655
|
) {
|
|
455
656
|
this.changeRuntime(this.executionState.selectedRuntime);
|
|
657
|
+
} else if (
|
|
658
|
+
this.executionState instanceof LakehouseDataProductExecutionState &&
|
|
659
|
+
accessor &&
|
|
660
|
+
this.executionState.selectedRuntime instanceof PackageableRuntime
|
|
661
|
+
) {
|
|
662
|
+
this.setSourceElement(accessor);
|
|
663
|
+
this.changeRuntime(
|
|
664
|
+
new RuntimePointer(
|
|
665
|
+
PackageableElementExplicitReference.create(
|
|
666
|
+
this.executionState.selectedRuntime,
|
|
667
|
+
),
|
|
668
|
+
),
|
|
669
|
+
);
|
|
456
670
|
}
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
this.
|
|
671
|
+
if (mapping) {
|
|
672
|
+
const compatibleClasses = resolveUsableDataProductClasses(
|
|
673
|
+
this.activeFeaturedElements,
|
|
674
|
+
mapping,
|
|
675
|
+
this.graphManagerState,
|
|
676
|
+
undefined,
|
|
677
|
+
);
|
|
678
|
+
// if there is no chosen class or the chosen one is not compatible
|
|
679
|
+
// with the mapping then pick a compatible class if possible
|
|
680
|
+
if (
|
|
681
|
+
!this.sourceClass ||
|
|
682
|
+
!compatibleClasses.includes(this.sourceClass)
|
|
683
|
+
) {
|
|
684
|
+
const possibleNewClass = compatibleClasses[0];
|
|
685
|
+
if (possibleNewClass) {
|
|
686
|
+
this.changeSourceElement(possibleNewClass);
|
|
687
|
+
}
|
|
469
688
|
}
|
|
470
689
|
}
|
|
471
690
|
} catch (error) {
|
|
@@ -489,12 +708,40 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
|
|
|
489
708
|
}
|
|
490
709
|
|
|
491
710
|
setExecutionState(
|
|
492
|
-
val:
|
|
711
|
+
val:
|
|
712
|
+
| NativeModelExecutionContext
|
|
713
|
+
| ModelAccessPointGroup
|
|
714
|
+
| LakehouseAccessPoint,
|
|
493
715
|
): void {
|
|
494
716
|
this.executionState =
|
|
495
717
|
val instanceof NativeModelExecutionContext
|
|
496
718
|
? new NativeModelDataProductExecutionState(val, this)
|
|
497
|
-
:
|
|
719
|
+
: val instanceof LakehouseAccessPoint
|
|
720
|
+
? new LakehouseDataProductExecutionState(val, this)
|
|
721
|
+
: new ModelAccessPointDataProductExecutionState(val, this);
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
async changeExecutionState(
|
|
725
|
+
val:
|
|
726
|
+
| NativeModelExecutionContext
|
|
727
|
+
| ModelAccessPointGroup
|
|
728
|
+
| LakehouseAccessPoint,
|
|
729
|
+
): Promise<void> {
|
|
730
|
+
this.setExecutionState(val);
|
|
731
|
+
if (val instanceof LakehouseAccessPoint) {
|
|
732
|
+
const relationMetadata =
|
|
733
|
+
await this.graphManagerState.graphManager.getLambdaRelationType(
|
|
734
|
+
val.func,
|
|
735
|
+
this.graphManagerState.graph,
|
|
736
|
+
);
|
|
737
|
+
const accessor = buildDataProductAccessor(
|
|
738
|
+
relationMetadata,
|
|
739
|
+
this.dataProduct,
|
|
740
|
+
val,
|
|
741
|
+
this.graphManagerState.graph,
|
|
742
|
+
);
|
|
743
|
+
this.setSourceElement(accessor);
|
|
744
|
+
}
|
|
498
745
|
}
|
|
499
746
|
|
|
500
747
|
get modelAccessPointGroups(): ModelAccessPointGroup[] {
|
|
@@ -613,7 +860,11 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
|
|
|
613
860
|
// contains model access point group
|
|
614
861
|
this.dataProduct.accessPointGroups.filter(
|
|
615
862
|
filterByType(ModelAccessPointGroup),
|
|
616
|
-
).length > 0
|
|
863
|
+
).length > 0 ||
|
|
864
|
+
// contains lakehouse access point
|
|
865
|
+
this.dataProduct.accessPointGroups.some((group) =>
|
|
866
|
+
group.accessPoints.some((ap) => ap instanceof LakehouseAccessPoint),
|
|
867
|
+
)
|
|
617
868
|
);
|
|
618
869
|
}
|
|
619
870
|
|
|
@@ -641,8 +892,8 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
|
|
|
641
892
|
this.graphManagerState,
|
|
642
893
|
undefined,
|
|
643
894
|
);
|
|
644
|
-
if (this.
|
|
645
|
-
this.
|
|
895
|
+
if (this.sourceClass && !classes.includes(this.sourceClass)) {
|
|
896
|
+
this.setSourceElement(classes[0]);
|
|
646
897
|
}
|
|
647
898
|
}
|
|
648
899
|
}
|
package/tsconfig.json
CHANGED
|
@@ -106,6 +106,7 @@
|
|
|
106
106
|
"./src/stores/QueryLoaderState.ts",
|
|
107
107
|
"./src/stores/ServiceInfo.ts",
|
|
108
108
|
"./src/stores/__test-utils__/QueryBuilderStateTestUtils.ts",
|
|
109
|
+
"./src/stores/__test-utils__/TEST_DATA__QueryBuilder_Accessors.ts",
|
|
109
110
|
"./src/stores/data-access/DataAccessState.ts",
|
|
110
111
|
"./src/stores/data-cube/QueryBuilderDataCubeEngine.ts",
|
|
111
112
|
"./src/stores/data-cube/QueryBuilderDataCubeHelper.ts",
|
|
@@ -181,6 +182,7 @@
|
|
|
181
182
|
"./src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Count.ts",
|
|
182
183
|
"./src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Max.ts",
|
|
183
184
|
"./src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Min.ts",
|
|
185
|
+
"./src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_PercentRank.ts",
|
|
184
186
|
"./src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Sum.ts",
|
|
185
187
|
"./src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_AverageRank.ts",
|
|
186
188
|
"./src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_DenseRank.ts",
|
|
@@ -226,6 +228,8 @@
|
|
|
226
228
|
"./src/stores/workflows/FunctionQueryBuilderState.ts",
|
|
227
229
|
"./src/stores/workflows/MappingQueryBuilderState.ts",
|
|
228
230
|
"./src/stores/workflows/ServiceQueryBuilderState.ts",
|
|
231
|
+
"./src/stores/workflows/accessor/AccessorQueryBuilderHelper.ts",
|
|
232
|
+
"./src/stores/workflows/accessor/AccessorQueryBuilderState.ts",
|
|
229
233
|
"./src/stores/workflows/dataProduct/DataProductQueryBuilderState.ts",
|
|
230
234
|
"./src/components/QueryBuilder.tsx",
|
|
231
235
|
"./src/components/QueryBuilderConstantExpressionPanel.tsx",
|
|
@@ -264,6 +268,7 @@
|
|
|
264
268
|
"./src/components/explorer/QueryBuilderFunctionsExplorerPanel.tsx",
|
|
265
269
|
"./src/components/explorer/QueryBuilderMilestoningParameterEditor.tsx",
|
|
266
270
|
"./src/components/explorer/QueryBuilderPropertySearchPanel.tsx",
|
|
271
|
+
"./src/components/explorer/QueryBuilderRelationExplorerPanel.tsx",
|
|
267
272
|
"./src/components/fetch-structure/QueryBuilderAggParam.tsx",
|
|
268
273
|
"./src/components/fetch-structure/QueryBuilderFetchStructurePanel.tsx",
|
|
269
274
|
"./src/components/fetch-structure/QueryBuilderGraphFetchTreePanel.tsx",
|
|
@@ -294,6 +299,7 @@
|
|
|
294
299
|
"./src/components/sql-playground/SQLPlaygroundExplorer.tsx",
|
|
295
300
|
"./src/components/sql-playground/SQLPlaygroundGrid.tsx",
|
|
296
301
|
"./src/components/sql-playground/SQLPlaygroundPanel.tsx",
|
|
302
|
+
"./src/components/workflows/AccessorQueryBuilder.tsx",
|
|
297
303
|
"./src/components/workflows/ClassQueryBuilder.tsx",
|
|
298
304
|
"./src/components/workflows/DataProductQueryBuilder.tsx",
|
|
299
305
|
"./src/components/workflows/MappingQueryBuilder.tsx",
|