File tree Expand file tree Collapse file tree 2 files changed +1
-21
lines changed
packages/cubejs-schema-compiler
test/integration/postgres Expand file tree Collapse file tree 2 files changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -2497,26 +2497,6 @@ export class BaseQuery {
24972497 joinHints = joinHints . filter ( e => e !== targetCube ) ;
24982498 joinHints . push ( targetCube ) ;
24992499 this . safeEvaluateSymbolContext ( ) . joinHints = joinHints ;
2500-
2501- // Special processing is required when one cube extends another, because in this case
2502- // cube names collected during joins evaluation might belong to ancestors which are out of scope of
2503- // the current query and thus will lead to `Can't find join path to join cubes` error.
2504- // To work around this we change the all ancestors cube names in collected join hints to the original one.
2505- if ( s . cube ( ) . extends ) {
2506- const cubeName = s . cube ( ) . name ;
2507- let parentCube = this . cubeEvaluator . resolveSymbolsCall ( s . cube ( ) . extends , ( name ) => this . cubeEvaluator . cubeFromPath ( name ) ) ;
2508- while ( parentCube ) {
2509- // eslint-disable-next-line no-loop-func
2510- joinHints . forEach ( ( item , index , array ) => {
2511- if ( item === parentCube . name ) {
2512- array [ index ] = cubeName ;
2513- }
2514- } ) ;
2515- parentCube = parentCube . extends ?
2516- this . cubeEvaluator . resolveSymbolsCall ( parentCube . extends , ( name ) => this . cubeEvaluator . cubeFromPath ( name ) )
2517- : null ;
2518- }
2519- }
25202500 }
25212501 return res ;
25222502 }
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ describe('PreAggregations', () => {
2626
2727 cards: {
2828 relationship: 'hasMany',
29- sql: \`\${visitors .id} = \${cards.visitorId}\`
29+ sql: \`\${CUBE .id} = \${cards.visitorId}\`
3030 }
3131 },
3232
You can’t perform that action at this time.
0 commit comments