@finos/legend-query-builder 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (295) hide show
  1. package/lib/components/QueryBuilder.d.ts +0 -1
  2. package/lib/components/QueryBuilder.d.ts.map +1 -1
  3. package/lib/components/QueryBuilder.js +42 -9
  4. package/lib/components/QueryBuilder.js.map +1 -1
  5. package/lib/components/QueryBuilderComponentTestUtils.d.ts.map +1 -1
  6. package/lib/components/QueryBuilderComponentTestUtils.js +2 -5
  7. package/lib/components/QueryBuilderComponentTestUtils.js.map +1 -1
  8. package/lib/components/QueryBuilderDiffPanel.d.ts +0 -1
  9. package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
  10. package/lib/components/QueryBuilderDiffPanel.js +2 -2
  11. package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
  12. package/lib/components/QueryBuilderParametersPanel.d.ts +0 -1
  13. package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
  14. package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +0 -1
  15. package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
  16. package/lib/components/QueryBuilderResultPanel.d.ts +0 -1
  17. package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
  18. package/lib/components/QueryBuilderResultPanel.js +3 -3
  19. package/lib/components/QueryBuilderSideBar.d.ts +0 -1
  20. package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
  21. package/lib/components/QueryBuilderSideBar.js +2 -1
  22. package/lib/components/QueryBuilderSideBar.js.map +1 -1
  23. package/lib/components/QueryBuilderTextEditor.d.ts +0 -1
  24. package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
  25. package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts +0 -1
  26. package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts.map +1 -1
  27. package/lib/components/QueryBuilder_TestID.d.ts +1 -0
  28. package/lib/components/QueryBuilder_TestID.d.ts.map +1 -1
  29. package/lib/components/QueryBuilder_TestID.js +1 -0
  30. package/lib/components/QueryBuilder_TestID.js.map +1 -1
  31. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts +0 -1
  32. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
  33. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js +5 -5
  34. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js.map +1 -1
  35. package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts +0 -1
  36. package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
  37. package/lib/components/explorer/QueryBuilderMilestoningEditor.js +2 -2
  38. package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -1
  39. package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts +0 -1
  40. package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -1
  41. package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts +0 -1
  42. package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts.map +1 -1
  43. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts +0 -1
  44. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -1
  45. package/lib/components/fetch-structure/QueryBuilderOlapGroupByPanel.d.ts +22 -0
  46. package/lib/components/fetch-structure/QueryBuilderOlapGroupByPanel.d.ts.map +1 -0
  47. package/lib/components/fetch-structure/QueryBuilderOlapGroupByPanel.js +363 -0
  48. package/lib/components/fetch-structure/QueryBuilderOlapGroupByPanel.js.map +1 -0
  49. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +0 -1
  50. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
  51. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +21 -53
  52. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
  53. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts +22 -0
  54. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts.map +1 -0
  55. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js +32 -0
  56. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js.map +1 -0
  57. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +0 -1
  58. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
  59. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +2 -1
  60. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
  61. package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.d.ts +27 -0
  62. package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.d.ts.map +1 -0
  63. package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.js +61 -0
  64. package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.js.map +1 -0
  65. package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts +0 -1
  66. package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
  67. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +4 -13
  68. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
  69. package/lib/components/filter/QueryBuilderFilterPanel.d.ts +0 -1
  70. package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
  71. package/lib/components/shared/LambdaEditor.d.ts +0 -1
  72. package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
  73. package/lib/components/shared/LambdaEditor.js +23 -7
  74. package/lib/components/shared/LambdaEditor.js.map +1 -1
  75. package/lib/components/shared/LambdaParameterValuesEditor.d.ts +0 -1
  76. package/lib/components/shared/LambdaParameterValuesEditor.d.ts.map +1 -1
  77. package/lib/components/workflows/ServiceQueryBuilder.d.ts.map +1 -1
  78. package/lib/components/workflows/ServiceQueryBuilder.js +5 -1
  79. package/lib/components/workflows/ServiceQueryBuilder.js.map +1 -1
  80. package/lib/graphManager/QueryBuilderHashUtils.d.ts +14 -0
  81. package/lib/graphManager/QueryBuilderHashUtils.d.ts.map +1 -1
  82. package/lib/graphManager/QueryBuilderHashUtils.js +15 -0
  83. package/lib/graphManager/QueryBuilderHashUtils.js.map +1 -1
  84. package/lib/graphManager/QueryBuilderSupportedFunctions.d.ts +7 -1
  85. package/lib/graphManager/QueryBuilderSupportedFunctions.d.ts.map +1 -1
  86. package/lib/graphManager/QueryBuilderSupportedFunctions.js +7 -0
  87. package/lib/graphManager/QueryBuilderSupportedFunctions.js.map +1 -1
  88. package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.d.ts.map +1 -1
  89. package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js +4 -1
  90. package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js.map +1 -1
  91. package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts +1 -0
  92. package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts.map +1 -1
  93. package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js +50 -0
  94. package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js.map +1 -1
  95. package/lib/index.css +2 -2
  96. package/lib/index.css.map +1 -1
  97. package/lib/package.json +6 -6
  98. package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -1
  99. package/lib/stores/QueryBuilderStateBuilder.js +7 -1
  100. package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
  101. package/lib/stores/QueryBuilderStateTestUtils.d.ts.map +1 -1
  102. package/lib/stores/QueryBuilderStateTestUtils.js +2 -4
  103. package/lib/stores/QueryBuilderStateTestUtils.js.map +1 -1
  104. package/lib/stores/QueryBuilderTypeaheadHelper.js +2 -2
  105. package/lib/stores/explorer/QueryBuilderExplorerState.js +3 -3
  106. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +1 -0
  107. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
  108. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js +3 -0
  109. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
  110. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -1
  111. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +2 -1
  112. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
  113. package/lib/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.d.ts +24 -0
  114. package/lib/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.d.ts.map +1 -0
  115. package/lib/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.js +20 -0
  116. package/lib/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.js.map +1 -0
  117. package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.d.ts +23 -0
  118. package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.d.ts.map +1 -0
  119. package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.js +41 -0
  120. package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.js.map +1 -0
  121. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +11 -0
  122. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
  123. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +44 -1
  124. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
  125. package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.d.ts +2 -2
  126. package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.d.ts.map +1 -1
  127. package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.js +2 -2
  128. package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.js.map +1 -1
  129. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.js +1 -1
  130. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.d.ts +4 -4
  131. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.d.ts.map +1 -1
  132. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js +8 -7
  133. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js.map +1 -1
  134. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.d.ts +18 -0
  135. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.d.ts.map +1 -0
  136. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.js +36 -0
  137. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.js.map +1 -0
  138. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.d.ts +91 -0
  139. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.d.ts.map +1 -0
  140. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.js +272 -0
  141. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.js.map +1 -0
  142. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.d.ts +19 -0
  143. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.d.ts.map +1 -0
  144. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.js +100 -0
  145. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.js.map +1 -0
  146. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.d.ts +19 -0
  147. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.d.ts.map +1 -0
  148. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.js +83 -0
  149. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.js.map +1 -0
  150. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.d.ts +29 -0
  151. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.d.ts.map +1 -0
  152. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.js +30 -0
  153. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.js.map +1 -0
  154. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.d.ts +25 -0
  155. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.d.ts.map +1 -0
  156. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.js +50 -0
  157. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.js.map +1 -0
  158. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.d.ts +25 -0
  159. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.d.ts.map +1 -0
  160. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.js +51 -0
  161. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.js.map +1 -0
  162. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.d.ts +25 -0
  163. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.d.ts.map +1 -0
  164. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.js +50 -0
  165. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.js.map +1 -0
  166. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.d.ts +25 -0
  167. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.d.ts.map +1 -0
  168. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.js +50 -0
  169. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.js.map +1 -0
  170. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.d.ts +25 -0
  171. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.d.ts.map +1 -0
  172. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.js +51 -0
  173. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.js.map +1 -0
  174. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.d.ts +24 -0
  175. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.d.ts.map +1 -0
  176. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.js +48 -0
  177. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.js.map +1 -0
  178. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.d.ts +24 -0
  179. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.d.ts.map +1 -0
  180. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.js +48 -0
  181. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.js.map +1 -0
  182. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.d.ts +24 -0
  183. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.d.ts.map +1 -0
  184. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.js +48 -0
  185. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.js.map +1 -0
  186. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.d.ts +24 -0
  187. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.d.ts.map +1 -0
  188. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.js +48 -0
  189. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.js.map +1 -0
  190. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.d.ts +1 -1
  191. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.js +2 -2
  192. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts +6 -4
  193. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
  194. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +14 -3
  195. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
  196. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.d.ts.map +1 -1
  197. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.js +8 -11
  198. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.js.map +1 -1
  199. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts +2 -2
  200. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts.map +1 -1
  201. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js +5 -1
  202. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +1 -1
  203. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js +4 -4
  204. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +1 -1
  205. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +1 -1
  206. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +3 -3
  207. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +3 -3
  208. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js +1 -1
  209. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.js +2 -2
  210. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts +2 -2
  211. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js +3 -3
  212. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +3 -3
  213. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js +1 -1
  214. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +1 -1
  215. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.d.ts +4 -6
  216. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.d.ts.map +1 -1
  217. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js +6 -5
  218. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js.map +1 -1
  219. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -1
  220. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js +1 -0
  221. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
  222. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -1
  223. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +6 -3
  224. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
  225. package/lib/stores/filter/QueryBuilderFilterState.d.ts +2 -0
  226. package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
  227. package/lib/stores/filter/QueryBuilderFilterState.js +6 -0
  228. package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
  229. package/package.json +13 -13
  230. package/src/components/QueryBuilder.tsx +110 -35
  231. package/src/components/QueryBuilderComponentTestUtils.tsx +9 -11
  232. package/src/components/QueryBuilderDiffPanel.tsx +2 -2
  233. package/src/components/QueryBuilderResultPanel.tsx +4 -4
  234. package/src/components/QueryBuilderSideBar.tsx +4 -1
  235. package/src/components/QueryBuilder_TestID.ts +1 -0
  236. package/src/components/explorer/QueryBuilderFunctionsExplorerPanel.tsx +6 -6
  237. package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +2 -3
  238. package/src/components/fetch-structure/QueryBuilderOlapGroupByPanel.tsx +1140 -0
  239. package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +31 -106
  240. package/src/components/fetch-structure/QueryBuilderPostTDSPanel.tsx +69 -0
  241. package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +4 -1
  242. package/src/components/fetch-structure/QueryBuilderTDSComponentHelper.tsx +118 -0
  243. package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +4 -23
  244. package/src/components/shared/LambdaEditor.tsx +25 -22
  245. package/src/components/workflows/ServiceQueryBuilder.tsx +10 -2
  246. package/src/graphManager/QueryBuilderHashUtils.ts +16 -0
  247. package/src/graphManager/QueryBuilderSupportedFunctions.ts +7 -0
  248. package/src/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.ts +14 -0
  249. package/src/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.ts +129 -0
  250. package/src/stores/QueryBuilderStateBuilder.ts +14 -1
  251. package/src/stores/QueryBuilderStateTestUtils.ts +9 -13
  252. package/src/stores/QueryBuilderTypeaheadHelper.ts +2 -2
  253. package/src/stores/explorer/QueryBuilderExplorerState.ts +3 -3
  254. package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +4 -0
  255. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +2 -1
  256. package/src/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.ts +28 -0
  257. package/src/stores/fetch-structure/tds/QueryBuilderTDSHelper.ts +79 -0
  258. package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +68 -1
  259. package/src/stores/fetch-structure/tds/QueryResultSetModifierState.ts +2 -2
  260. package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.ts +1 -1
  261. package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.ts +11 -9
  262. package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.ts +39 -0
  263. package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.ts +377 -0
  264. package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.ts +237 -0
  265. package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.ts +148 -0
  266. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.ts +43 -0
  267. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.ts +56 -0
  268. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.ts +57 -0
  269. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.ts +56 -0
  270. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.ts +56 -0
  271. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.ts +57 -0
  272. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.ts +54 -0
  273. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.ts +54 -0
  274. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.ts +54 -0
  275. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.ts +54 -0
  276. package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.ts +2 -2
  277. package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +22 -10
  278. package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.ts +11 -19
  279. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts +8 -7
  280. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.ts +4 -4
  281. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +1 -1
  282. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +1 -1
  283. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +3 -3
  284. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +3 -3
  285. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts +1 -1
  286. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.ts +2 -2
  287. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts +3 -3
  288. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +3 -3
  289. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts +1 -1
  290. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +1 -1
  291. package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.ts +9 -11
  292. package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.ts +1 -0
  293. package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +8 -4
  294. package/src/stores/filter/QueryBuilderFilterState.ts +7 -0
  295. package/tsconfig.json +19 -0
@@ -0,0 +1,148 @@
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 LambdaFunction,
19
+ CollectionInstanceValue,
20
+ extractElementNameFromPath,
21
+ GenericType,
22
+ GenericTypeExplicitReference,
23
+ PrimitiveInstanceValue,
24
+ PRIMITIVE_TYPE,
25
+ SimpleFunctionExpression,
26
+ TYPICAL_MULTIPLICITY_TYPE,
27
+ VariableExpression,
28
+ } from '@finos/legend-graph';
29
+ import { guaranteeNonNullable } from '@finos/legend-shared';
30
+ import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../graphManager/QueryBuilderSupportedFunctions.js';
31
+ import { buildGenericLambdaFunctionInstanceValue } from '../../../QueryBuilderValueSpecificationHelper.js';
32
+ import { getFunctionNameFromTDSSortColumn } from '../QueryBuilderTDSHelper.js';
33
+ import {
34
+ type QueryBuilderOlapGroupByColumnState,
35
+ type QueryBuilderOlapGroupByState,
36
+ QueryBuilderTDSOlapAggreationOperatorState,
37
+ } from './QueryBuilderOlapGroupByState.js';
38
+
39
+ const appendOlapGroupByColumnState = (
40
+ olapGroupByColumnState: QueryBuilderOlapGroupByColumnState,
41
+ lambda: LambdaFunction,
42
+ ): LambdaFunction => {
43
+ const graph =
44
+ olapGroupByColumnState.olapState.tdsState.queryBuilderState
45
+ .graphManagerState.graph;
46
+ const multiplicityOne = graph.getTypicalMultiplicity(
47
+ TYPICAL_MULTIPLICITY_TYPE.ONE,
48
+ );
49
+ const typeString = graph.getPrimitiveType(PRIMITIVE_TYPE.STRING);
50
+
51
+ // create window cols expression
52
+ const windowColumns = olapGroupByColumnState.windowColumns.map((column) => {
53
+ const stringInstance = new PrimitiveInstanceValue(
54
+ GenericTypeExplicitReference.create(new GenericType(typeString)),
55
+ multiplicityOne,
56
+ );
57
+ stringInstance.values = [column.columnName];
58
+ return stringInstance;
59
+ });
60
+
61
+ const windowCollectionExpression = new CollectionInstanceValue(
62
+ graph.getMultiplicity(windowColumns.length, windowColumns.length),
63
+ );
64
+ windowCollectionExpression.values = windowColumns;
65
+
66
+ // create sortBy expression
67
+ let sortByFunction: SimpleFunctionExpression | undefined;
68
+ if (olapGroupByColumnState.sortByState) {
69
+ const sortByState = olapGroupByColumnState.sortByState;
70
+ sortByFunction = new SimpleFunctionExpression(
71
+ getFunctionNameFromTDSSortColumn(sortByState.sortType),
72
+ multiplicityOne,
73
+ );
74
+ const sortColInstance = new PrimitiveInstanceValue(
75
+ GenericTypeExplicitReference.create(new GenericType(typeString)),
76
+ multiplicityOne,
77
+ );
78
+ sortColInstance.values = [sortByState.columnState.columnName];
79
+ sortByFunction.parametersValues[0] = sortColInstance;
80
+ }
81
+
82
+ // create olap operation expression
83
+ const operationState = olapGroupByColumnState.operationState;
84
+ const olapFunc = extractElementNameFromPath(operationState.operator.pureFunc);
85
+ const olapFuncExpression = new SimpleFunctionExpression(
86
+ olapFunc,
87
+ multiplicityOne,
88
+ );
89
+ olapFuncExpression.parametersValues = [
90
+ new VariableExpression(operationState.lambdaParameterName, multiplicityOne),
91
+ ];
92
+ const olapLambdaFuncInstance = buildGenericLambdaFunctionInstanceValue(
93
+ operationState.lambdaParameterName,
94
+ [olapFuncExpression],
95
+ graph,
96
+ );
97
+ let olapAggregationExpression: SimpleFunctionExpression | undefined;
98
+ if (operationState instanceof QueryBuilderTDSOlapAggreationOperatorState) {
99
+ // column param
100
+ const olapAggregateColumn = new PrimitiveInstanceValue(
101
+ GenericTypeExplicitReference.create(new GenericType(typeString)),
102
+ multiplicityOne,
103
+ );
104
+ olapAggregateColumn.values = [operationState.columnState.columnName];
105
+ // build `meta::pure::tds::func`
106
+ olapAggregationExpression = new SimpleFunctionExpression(
107
+ extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_FUNC),
108
+ multiplicityOne,
109
+ );
110
+ olapAggregationExpression.parametersValues = [
111
+ olapAggregateColumn,
112
+ olapLambdaFuncInstance,
113
+ ];
114
+ }
115
+ const olapOperationExpression =
116
+ olapAggregationExpression ?? olapLambdaFuncInstance;
117
+
118
+ // OLAP column nam expression
119
+ const olapColumn = new PrimitiveInstanceValue(
120
+ GenericTypeExplicitReference.create(new GenericType(typeString)),
121
+ multiplicityOne,
122
+ );
123
+ olapColumn.values = [olapGroupByColumnState.columnName];
124
+
125
+ // create main expression
126
+ const olapExpression = new SimpleFunctionExpression(
127
+ extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.OLAP_GROUPBY),
128
+ multiplicityOne,
129
+ );
130
+ const currentExpression = guaranteeNonNullable(lambda.expressionSequence[0]);
131
+ olapExpression.parametersValues = [
132
+ ...[currentExpression, windowCollectionExpression],
133
+ ...(sortByFunction ? [sortByFunction] : []),
134
+ ...[olapOperationExpression, olapColumn],
135
+ ];
136
+ lambda.expressionSequence[0] = olapExpression;
137
+ return lambda;
138
+ };
139
+
140
+ export const appendOlapGroupByState = (
141
+ olapGroupByState: QueryBuilderOlapGroupByState,
142
+ lambda: LambdaFunction,
143
+ ): LambdaFunction => {
144
+ olapGroupByState.olapColumns.forEach((c) =>
145
+ appendOlapGroupByColumnState(c, lambda),
146
+ );
147
+ return lambda;
148
+ };
@@ -0,0 +1,43 @@
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 { PRIMITIVE_TYPE, type PureModel, type Type } from '@finos/legend-graph';
18
+ import { type Hashable, uuid } from '@finos/legend-shared';
19
+ import type { QueryBuilderTDSColumnState } from '../../QueryBuilderTDSColumnState_.js';
20
+
21
+ export abstract class QueryBuilderTDSOlapOperator implements Hashable {
22
+ readonly uuid = uuid();
23
+
24
+ abstract getLabel(): string;
25
+
26
+ abstract get hashCode(): string;
27
+
28
+ abstract get pureFunc(): string;
29
+
30
+ abstract isCompatibleWithType(type: Type | undefined): boolean;
31
+
32
+ isColumnAggregator(): boolean {
33
+ return false;
34
+ }
35
+
36
+ getOperatorReturnType(graph: PureModel): Type {
37
+ return graph.getPrimitiveType(PRIMITIVE_TYPE.NUMBER);
38
+ }
39
+
40
+ isCompatibleWithColumn(column: QueryBuilderTDSColumnState): boolean {
41
+ return this.isCompatibleWithType(column.getColumnType());
42
+ }
43
+ }
@@ -0,0 +1,56 @@
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 { hashArray } from '@finos/legend-shared';
18
+ import { type Type, PRIMITIVE_TYPE } from '@finos/legend-graph';
19
+ import { QueryBuilderTDSOlapOperator } from './QueryBuilderTDSOlapOperator_.js';
20
+ import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../../graphManager/QueryBuilderHashUtils.js';
21
+ import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graphManager/QueryBuilderSupportedFunctions.js';
22
+
23
+ export class QueryBuilderTDSOlapOperator_Average extends QueryBuilderTDSOlapOperator {
24
+ override isColumnAggregator(): boolean {
25
+ return true;
26
+ }
27
+
28
+ getLabel(): string {
29
+ return 'avg';
30
+ }
31
+ get pureFunc(): string {
32
+ return QUERY_BUILDER_SUPPORTED_FUNCTIONS.AVERAGE;
33
+ }
34
+
35
+ get hashCode(): string {
36
+ return hashArray([QUERY_BUILDER_HASH_STRUCTURE.OLAP_OPERATOR_AVERAGE]);
37
+ }
38
+
39
+ isCompatibleWithType(type: Type | undefined): boolean {
40
+ if (type) {
41
+ return (
42
+ [
43
+ PRIMITIVE_TYPE.BOOLEAN,
44
+ PRIMITIVE_TYPE.NUMBER,
45
+ PRIMITIVE_TYPE.INTEGER,
46
+ PRIMITIVE_TYPE.DECIMAL,
47
+ PRIMITIVE_TYPE.FLOAT,
48
+ PRIMITIVE_TYPE.DATE,
49
+ PRIMITIVE_TYPE.STRICTDATE,
50
+ PRIMITIVE_TYPE.DATETIME,
51
+ ] as string[]
52
+ ).includes(type.path);
53
+ }
54
+ return true;
55
+ }
56
+ }
@@ -0,0 +1,57 @@
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 { hashArray } from '@finos/legend-shared';
18
+ import { type Type, PRIMITIVE_TYPE } from '@finos/legend-graph';
19
+ import { QueryBuilderTDSOlapOperator } from './QueryBuilderTDSOlapOperator_.js';
20
+ import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../../graphManager/QueryBuilderHashUtils.js';
21
+ import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graphManager/QueryBuilderSupportedFunctions.js';
22
+
23
+ export class QueryBuilderTDSOlapOperator_Count extends QueryBuilderTDSOlapOperator {
24
+ override isColumnAggregator(): boolean {
25
+ return true;
26
+ }
27
+
28
+ getLabel(): string {
29
+ return 'count';
30
+ }
31
+ get pureFunc(): string {
32
+ return QUERY_BUILDER_SUPPORTED_FUNCTIONS.COUNT;
33
+ }
34
+
35
+ get hashCode(): string {
36
+ return hashArray([QUERY_BUILDER_HASH_STRUCTURE.OLAP_OPERATOR_COUNT]);
37
+ }
38
+
39
+ isCompatibleWithType(type: Type | undefined): boolean {
40
+ if (type) {
41
+ return (
42
+ [
43
+ PRIMITIVE_TYPE.STRING,
44
+ PRIMITIVE_TYPE.BOOLEAN,
45
+ PRIMITIVE_TYPE.NUMBER,
46
+ PRIMITIVE_TYPE.INTEGER,
47
+ PRIMITIVE_TYPE.DECIMAL,
48
+ PRIMITIVE_TYPE.FLOAT,
49
+ PRIMITIVE_TYPE.DATE,
50
+ PRIMITIVE_TYPE.STRICTDATE,
51
+ PRIMITIVE_TYPE.DATETIME,
52
+ ] as string[]
53
+ ).includes(type.path);
54
+ }
55
+ return true;
56
+ }
57
+ }
@@ -0,0 +1,56 @@
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 { hashArray } from '@finos/legend-shared';
18
+ import { type Type, PRIMITIVE_TYPE } from '@finos/legend-graph';
19
+ import { QueryBuilderTDSOlapOperator } from './QueryBuilderTDSOlapOperator_.js';
20
+ import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../../graphManager/QueryBuilderHashUtils.js';
21
+ import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graphManager/QueryBuilderSupportedFunctions.js';
22
+
23
+ export class QueryBuilderTDSOlapOperator_Max extends QueryBuilderTDSOlapOperator {
24
+ override isColumnAggregator(): boolean {
25
+ return true;
26
+ }
27
+
28
+ getLabel(): string {
29
+ return 'max';
30
+ }
31
+ get pureFunc(): string {
32
+ return QUERY_BUILDER_SUPPORTED_FUNCTIONS.MAX;
33
+ }
34
+
35
+ get hashCode(): string {
36
+ return hashArray([QUERY_BUILDER_HASH_STRUCTURE.OLAP_OPERATOR_MAX]);
37
+ }
38
+
39
+ isCompatibleWithType(type: Type | undefined): boolean {
40
+ if (type) {
41
+ return (
42
+ [
43
+ PRIMITIVE_TYPE.BOOLEAN,
44
+ PRIMITIVE_TYPE.NUMBER,
45
+ PRIMITIVE_TYPE.INTEGER,
46
+ PRIMITIVE_TYPE.DECIMAL,
47
+ PRIMITIVE_TYPE.FLOAT,
48
+ PRIMITIVE_TYPE.DATE,
49
+ PRIMITIVE_TYPE.STRICTDATE,
50
+ PRIMITIVE_TYPE.DATETIME,
51
+ ] as string[]
52
+ ).includes(type.path);
53
+ }
54
+ return true;
55
+ }
56
+ }
@@ -0,0 +1,56 @@
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 { hashArray } from '@finos/legend-shared';
18
+ import { type Type, PRIMITIVE_TYPE } from '@finos/legend-graph';
19
+ import { QueryBuilderTDSOlapOperator } from './QueryBuilderTDSOlapOperator_.js';
20
+ import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../../graphManager/QueryBuilderHashUtils.js';
21
+ import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graphManager/QueryBuilderSupportedFunctions.js';
22
+
23
+ export class QueryBuilderTDSOlapOperator_Min extends QueryBuilderTDSOlapOperator {
24
+ override isColumnAggregator(): boolean {
25
+ return true;
26
+ }
27
+
28
+ getLabel(): string {
29
+ return 'min';
30
+ }
31
+ get pureFunc(): string {
32
+ return QUERY_BUILDER_SUPPORTED_FUNCTIONS.MIN;
33
+ }
34
+
35
+ get hashCode(): string {
36
+ return hashArray([QUERY_BUILDER_HASH_STRUCTURE.OLAP_OPERATOR_MIN]);
37
+ }
38
+
39
+ isCompatibleWithType(type: Type | undefined): boolean {
40
+ if (type) {
41
+ return (
42
+ [
43
+ PRIMITIVE_TYPE.BOOLEAN,
44
+ PRIMITIVE_TYPE.NUMBER,
45
+ PRIMITIVE_TYPE.INTEGER,
46
+ PRIMITIVE_TYPE.DECIMAL,
47
+ PRIMITIVE_TYPE.FLOAT,
48
+ PRIMITIVE_TYPE.DATE,
49
+ PRIMITIVE_TYPE.STRICTDATE,
50
+ PRIMITIVE_TYPE.DATETIME,
51
+ ] as string[]
52
+ ).includes(type.path);
53
+ }
54
+ return true;
55
+ }
56
+ }
@@ -0,0 +1,57 @@
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 { hashArray } from '@finos/legend-shared';
18
+ import { type Type, PRIMITIVE_TYPE } from '@finos/legend-graph';
19
+ import { QueryBuilderTDSOlapOperator } from './QueryBuilderTDSOlapOperator_.js';
20
+ import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../../graphManager/QueryBuilderHashUtils.js';
21
+ import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graphManager/QueryBuilderSupportedFunctions.js';
22
+
23
+ export class QueryBuilderTDSOlapOperator_Sum extends QueryBuilderTDSOlapOperator {
24
+ override isColumnAggregator(): boolean {
25
+ return true;
26
+ }
27
+
28
+ getLabel(): string {
29
+ return 'sum';
30
+ }
31
+ get pureFunc(): string {
32
+ return QUERY_BUILDER_SUPPORTED_FUNCTIONS.SUM;
33
+ }
34
+
35
+ get hashCode(): string {
36
+ return hashArray([QUERY_BUILDER_HASH_STRUCTURE.OLAP_OPERATOR_SUM]);
37
+ }
38
+
39
+ isCompatibleWithType(type: Type | undefined): boolean {
40
+ if (type) {
41
+ return (
42
+ [
43
+ PRIMITIVE_TYPE.STRING,
44
+ PRIMITIVE_TYPE.BOOLEAN,
45
+ PRIMITIVE_TYPE.NUMBER,
46
+ PRIMITIVE_TYPE.INTEGER,
47
+ PRIMITIVE_TYPE.DECIMAL,
48
+ PRIMITIVE_TYPE.FLOAT,
49
+ PRIMITIVE_TYPE.DATE,
50
+ PRIMITIVE_TYPE.STRICTDATE,
51
+ PRIMITIVE_TYPE.DATETIME,
52
+ ] as string[]
53
+ ).includes(type.path);
54
+ }
55
+ return true;
56
+ }
57
+ }
@@ -0,0 +1,54 @@
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 { PRIMITIVE_TYPE, type Type } from '@finos/legend-graph';
18
+ import { hashArray } from '@finos/legend-shared';
19
+ import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../../graphManager/QueryBuilderHashUtils.js';
20
+ import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graphManager/QueryBuilderSupportedFunctions.js';
21
+ import { QueryBuilderTDSOlapOperator } from './QueryBuilderTDSOlapOperator_.js';
22
+
23
+ export class QueryBuilderTDSOlapRankOperator_AverageRank extends QueryBuilderTDSOlapOperator {
24
+ getLabel(): string {
25
+ return 'average rank';
26
+ }
27
+
28
+ get pureFunc(): string {
29
+ return QUERY_BUILDER_SUPPORTED_FUNCTIONS.OLAP_AVERAGE_RANK;
30
+ }
31
+
32
+ get hashCode(): string {
33
+ return hashArray([QUERY_BUILDER_HASH_STRUCTURE.OLAP_OPERATOR_DENSE_RANK]);
34
+ }
35
+
36
+ isCompatibleWithType(type: Type | undefined): boolean {
37
+ if (type) {
38
+ return (
39
+ [
40
+ PRIMITIVE_TYPE.STRING,
41
+ PRIMITIVE_TYPE.BOOLEAN,
42
+ PRIMITIVE_TYPE.NUMBER,
43
+ PRIMITIVE_TYPE.INTEGER,
44
+ PRIMITIVE_TYPE.DECIMAL,
45
+ PRIMITIVE_TYPE.FLOAT,
46
+ PRIMITIVE_TYPE.DATE,
47
+ PRIMITIVE_TYPE.STRICTDATE,
48
+ PRIMITIVE_TYPE.DATETIME,
49
+ ] as string[]
50
+ ).includes(type.path);
51
+ }
52
+ return true;
53
+ }
54
+ }
@@ -0,0 +1,54 @@
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 { PRIMITIVE_TYPE, type Type } from '@finos/legend-graph';
18
+ import { hashArray } from '@finos/legend-shared';
19
+ import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../../graphManager/QueryBuilderHashUtils.js';
20
+ import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graphManager/QueryBuilderSupportedFunctions.js';
21
+ import { QueryBuilderTDSOlapOperator } from './QueryBuilderTDSOlapOperator_.js';
22
+
23
+ export class QueryBuilderTDSOlapRankOperator_DenseRank extends QueryBuilderTDSOlapOperator {
24
+ getLabel(): string {
25
+ return 'dense rank';
26
+ }
27
+
28
+ get pureFunc(): string {
29
+ return QUERY_BUILDER_SUPPORTED_FUNCTIONS.OLAP_DENSE_RANK;
30
+ }
31
+
32
+ get hashCode(): string {
33
+ return hashArray([QUERY_BUILDER_HASH_STRUCTURE.OLAP_OPERATOR_DENSE_RANK]);
34
+ }
35
+
36
+ isCompatibleWithType(type: Type | undefined): boolean {
37
+ if (type) {
38
+ return (
39
+ [
40
+ PRIMITIVE_TYPE.STRING,
41
+ PRIMITIVE_TYPE.BOOLEAN,
42
+ PRIMITIVE_TYPE.NUMBER,
43
+ PRIMITIVE_TYPE.INTEGER,
44
+ PRIMITIVE_TYPE.DECIMAL,
45
+ PRIMITIVE_TYPE.FLOAT,
46
+ PRIMITIVE_TYPE.DATE,
47
+ PRIMITIVE_TYPE.STRICTDATE,
48
+ PRIMITIVE_TYPE.DATETIME,
49
+ ] as string[]
50
+ ).includes(type.path);
51
+ }
52
+ return true;
53
+ }
54
+ }
@@ -0,0 +1,54 @@
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 { PRIMITIVE_TYPE, type Type } from '@finos/legend-graph';
18
+ import { hashArray } from '@finos/legend-shared';
19
+ import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../../graphManager/QueryBuilderHashUtils.js';
20
+ import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graphManager/QueryBuilderSupportedFunctions.js';
21
+ import { QueryBuilderTDSOlapOperator } from './QueryBuilderTDSOlapOperator_.js';
22
+
23
+ export class QueryBuilderTDSOlapRankOperator_Rank extends QueryBuilderTDSOlapOperator {
24
+ getLabel(): string {
25
+ return 'rank';
26
+ }
27
+
28
+ get pureFunc(): string {
29
+ return QUERY_BUILDER_SUPPORTED_FUNCTIONS.OLAP_RANK;
30
+ }
31
+
32
+ get hashCode(): string {
33
+ return hashArray([QUERY_BUILDER_HASH_STRUCTURE.OLAP_OPERATOR_RANK]);
34
+ }
35
+
36
+ isCompatibleWithType(type: Type | undefined): boolean {
37
+ if (type) {
38
+ return (
39
+ [
40
+ PRIMITIVE_TYPE.STRING,
41
+ PRIMITIVE_TYPE.BOOLEAN,
42
+ PRIMITIVE_TYPE.NUMBER,
43
+ PRIMITIVE_TYPE.INTEGER,
44
+ PRIMITIVE_TYPE.DECIMAL,
45
+ PRIMITIVE_TYPE.FLOAT,
46
+ PRIMITIVE_TYPE.DATE,
47
+ PRIMITIVE_TYPE.STRICTDATE,
48
+ PRIMITIVE_TYPE.DATETIME,
49
+ ] as string[]
50
+ ).includes(type.path);
51
+ }
52
+ return true;
53
+ }
54
+ }