File tree Expand file tree Collapse file tree 3 files changed +22
-28
lines changed
packages/cubejs-schema-compiler
test/integration/postgres Expand file tree Collapse file tree 3 files changed +22
-28
lines changed Original file line number Diff line number Diff line change @@ -5062,7 +5062,7 @@ export class BaseQuery {
50625062 return false ;
50635063 }
50645064
5065- return dfs ( root ) ? path . join ( '.' ) : null ;
5065+ return ( root && dfs ( root ) ) ? path . join ( '.' ) : null ;
50665066 } ;
50675067 }
50685068
@@ -5080,7 +5080,7 @@ export class BaseQuery {
50805080 const [ cube , field ] = member . split ( '.' ) ;
50815081 if ( ! cube || ! field ) return member ;
50825082
5083- if ( cube === queryJoinRoot . root ) {
5083+ if ( cube === queryJoinRoot ? .root ) {
50845084 return member ;
50855085 }
50865086
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ export class PreAggregations {
144144 const { join } = this . query ;
145145 if ( ! join ) {
146146 // This can happen with Tesseract, or when there's no cubes to join
147- throw new Error ( 'Unexpected missing join tree for query' ) ;
147+ return [ ] ;
148148 }
149149 return join . joins . map ( j => j . originalTo ) . concat ( [ join . root ] ) ;
150150 }
Original file line number Diff line number Diff line change @@ -112,29 +112,23 @@ cube(\`city\`, {
112112 ) ;
113113 }
114114
115- if ( getEnv ( 'nativeSqlPlanner' ) ) {
116- it . skip ( 'FIXME(tesseract): two regular sub-queries' , ( ) => {
117- // TODO: Fix in tesseract
118- } ) ;
119- } else {
120- it ( 'two regular sub-queries' , async ( ) => runQueryTest ( {
121- measures : [ 'orders.amount' , 'shipments.count' ] ,
122- dimensions : [
123- 'city.name'
124- ] ,
125- order : [ { id : 'city.name' } ]
126- } , [ {
127- city__name : 'New York City' ,
128- orders__amount : '9' ,
129- shipments__count : '3' ,
130- } , {
131- city__name : 'San Francisco' ,
132- orders__amount : '6' ,
133- shipments__count : '1' ,
134- } , {
135- city__name : null ,
136- orders__amount : '6' ,
137- shipments__count : '1' ,
138- } ] ) ) ;
139- }
115+ it ( 'two regular sub-queries' , async ( ) => runQueryTest ( {
116+ measures : [ 'orders.amount' , 'shipments.count' ] ,
117+ dimensions : [
118+ 'city.name'
119+ ] ,
120+ order : [ { id : 'city.name' } ]
121+ } , [ {
122+ city__name : 'New York City' ,
123+ orders__amount : '9' ,
124+ shipments__count : '3' ,
125+ } , {
126+ city__name : 'San Francisco' ,
127+ orders__amount : '6' ,
128+ shipments__count : '1' ,
129+ } , {
130+ city__name : null ,
131+ orders__amount : '6' ,
132+ shipments__count : '1' ,
133+ } ] ) ) ;
140134} ) ;
You can’t perform that action at this time.
0 commit comments