@@ -59,16 +59,12 @@ export class SqlCompilerImpl implements SqlCompiler {
5959 */
6060 private extractLimitOffset ( ast : any ) : { limit ?: number ; skip ?: number } {
6161 const result : { limit ?: number ; skip ?: number } = { } ;
62-
62+
6363 if ( ! ast . limit ) return result ;
64-
64+
6565 log ( 'Extracting limit/offset from AST:' , JSON . stringify ( ast . limit , null , 2 ) ) ;
66-
67- if (
68- typeof ast . limit === 'object' &&
69- 'value' in ast . limit &&
70- ! Array . isArray ( ast . limit . value )
71- ) {
66+
67+ if ( typeof ast . limit === 'object' && 'value' in ast . limit && ! Array . isArray ( ast . limit . value ) ) {
7268 // Standard LIMIT format (without OFFSET)
7369 result . limit = Number ( ast . limit . value ) ;
7470 } else if (
@@ -92,7 +88,7 @@ export class SqlCompilerImpl implements SqlCompiler {
9288 result . limit = Number ( ast . limit . value [ 0 ] . value ) ;
9389 }
9490 }
95-
91+
9692 return result ;
9793 }
9894
@@ -101,13 +97,13 @@ export class SqlCompilerImpl implements SqlCompiler {
10197 */
10298 private extractFieldPath ( column : any ) : string {
10399 let fieldPath = '' ;
104-
100+
105101 if ( typeof column === 'string' ) {
106102 return this . processFieldName ( column ) ;
107103 }
108-
104+
109105 if ( typeof column !== 'object' ) return '' ;
110-
106+
111107 // Extract field path from different column formats
112108 if ( 'expr' in column && column . expr ) {
113109 // Special case for specs.size.diagonal where it appears as schema: specs, column: size.diagonal
@@ -158,7 +154,7 @@ export class SqlCompilerImpl implements SqlCompiler {
158154 fieldPath = this . processFieldName ( column . column ) ;
159155 }
160156 }
161-
157+
162158 return fieldPath ;
163159 }
164160
@@ -167,7 +163,7 @@ export class SqlCompilerImpl implements SqlCompiler {
167163 */
168164 private addFieldToProjection ( projection : Record < string , any > , fieldPath : string ) : void {
169165 if ( ! fieldPath ) return ;
170-
166+
171167 log ( `Processing field path for projection: ${ fieldPath } ` ) ;
172168
173169 if ( fieldPath . includes ( '.' ) ) {
0 commit comments