File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
packages/cubejs-testing-drivers/src/tests Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -2118,5 +2118,25 @@ from
21182118 ` ) ;
21192119 expect ( res . rows ) . toMatchSnapshot ( ) ;
21202120 } ) ;
2121+
2122+ executePg ( 'SQL API: Date/time comparison with SQL push down' , async ( connection ) => {
2123+ const res = await connection . query ( `
2124+ SELECT MEASURE(BigECommerce.rollingCountBy2Day)
2125+ FROM BigECommerce
2126+ WHERE BigECommerce.orderDate < CAST('2021-01-01' AS TIMESTAMP) AND
2127+ LOWER("city") = 'columbus'
2128+ ` ) ;
2129+ expect ( res . rows ) . toMatchSnapshot ( ) ;
2130+ } ) ;
2131+
2132+ executePg ( 'SQL API: Date/time comparison with date_trunc with SQL push down' , async ( connection ) => {
2133+ const res = await connection . query ( `
2134+ SELECT MEASURE(BigECommerce.rollingCountBy2Week)
2135+ FROM BigECommerce
2136+ WHERE date_trunc('day', BigECommerce.orderDate) < CAST('2021-01-01' AS TIMESTAMP) AND
2137+ LOWER("city") = 'columbus'
2138+ ` ) ;
2139+ expect ( res . rows ) . toMatchSnapshot ( ) ;
2140+ } ) ;
21212141 } ) ;
21222142}
You can’t perform that action at this time.
0 commit comments