@@ -302,6 +302,8 @@ const DEALS: Array<{ id: string; stage: string; closed_at: string; close_on: str
302302 { id : 'd5' , stage : 'lost' , closed_at : '2026-09-30T16:00:00.000Z' , close_on : '2026-10-01' } , // Shanghai Oct 1 00:00
303303 { id : 'd6' , stage : 'won' , closed_at : '2026-08-10T02:00:00.000Z' , close_on : '2026-08-10' } ,
304304 { id : 'd7' , stage : 'lost' , closed_at : '2026-01-05T02:00:00.000Z' , close_on : '2026-01-05' } ,
305+ { id : 'd8' , stage : 'won' , closed_at : '2026-08-03T02:00:00.000Z' , close_on : '2026-08-03' } , // August, before last_30_days
306+ { id : 'd9' , stage : 'won' , closed_at : '2026-11-20T02:00:00.000Z' , close_on : '2026-11-20' } ,
305307] ;
306308
307309const deals = DatasetSchema . parse ( {
@@ -368,14 +370,14 @@ describe('#27074 — on a real engine, each row drill lists exactly the records
368370 [
369371 'stage × this_quarter on the datetime field, Shanghai' ,
370372 { dimensions : [ 'stage' ] , timeDimensions : [ { dimension : 'closed' , dateRange : 'this_quarter' } ] , timezone : SHANGHAI } ,
371- { won : [ 'd2' , 'd3' , 'd6' ] , lost : [ 'd4' ] } ,
373+ { won : [ 'd2' , 'd3' , 'd6' , 'd8' ] , lost : [ 'd4' ] } ,
372374 ] ,
373375 [
374376 'stage × an explicit bare-day window on the datetime field, Shanghai' ,
375377 { dimensions : [ 'stage' ] , timeDimensions : [ { dimension : 'closed' , dateRange : [ '2026-07-01' , '2026-09-30' ] } ] , timezone : SHANGHAI } ,
376378 // The explicit arm keeps the engine's UTC calendar day (ADR-0053 D-D):
377379 // d2 is Shanghai's July but UTC's June, d5 the other way round.
378- { won : [ 'd3' , 'd6' ] , lost : [ 'd4' , 'd5' ] } ,
380+ { won : [ 'd3' , 'd6' , 'd8' ] , lost : [ 'd4' , 'd5' ] } ,
379381 ] ,
380382 [
381383 'month buckets × last_30_days on the datetime field, Shanghai' ,
@@ -385,7 +387,7 @@ describe('#27074 — on a real engine, each row drill lists exactly the records
385387 [
386388 'stage × this_quarter on the date field, UTC' ,
387389 { dimensions : [ 'stage' ] , timeDimensions : [ { dimension : 'closed_on' , dateRange : 'this_quarter' } ] } ,
388- { won : [ 'd2' , 'd3' , 'd6' ] , lost : [ 'd4' ] } ,
390+ { won : [ 'd2' , 'd3' , 'd6' , 'd8' ] , lost : [ 'd4' ] } ,
389391 ] ,
390392 [
391393 // The query compares a `date` column with the preset's Shanghai-midnight
0 commit comments