@@ -108,21 +108,24 @@ pub async fn test_equality_delete() {
108108 . expect ( "Failed to insert values into table" ) ;
109109
110110 let batches = ctx
111- . sql ( "select product_id, sum(amount) from warehouse.test.orders group by product_id order by product_id " )
111+ . sql ( "select * from warehouse.test.orders order by id " )
112112 . await
113113 . expect ( "Failed to create plan for select" )
114114 . collect ( )
115115 . await
116116 . expect ( "Failed to execute select query" ) ;
117117
118118 let expected = [
119- "+------------+-----------------------------------+" ,
120- "| product_id | sum(warehouse.test.orders.amount) |" ,
121- "+------------+-----------------------------------+" ,
122- "| 1 | 7 |" ,
123- "| 2 | 1 |" ,
124- "| 3 | 3 |" ,
125- "+------------+-----------------------------------+" ,
119+ "+----+-------------+------------+------------+--------+" ,
120+ "| id | customer_id | product_id | date | amount |" ,
121+ "+----+-------------+------------+------------+--------+" ,
122+ "| 1 | 1 | 1 | 2020-01-01 | 1 |" ,
123+ "| 2 | 2 | 1 | 2020-01-01 | 1 |" ,
124+ "| 3 | 3 | 1 | 2020-01-01 | 3 |" ,
125+ "| 4 | 1 | 2 | 2020-02-02 | 1 |" ,
126+ "| 5 | 1 | 1 | 2020-02-02 | 2 |" ,
127+ "| 6 | 3 | 3 | 2020-02-02 | 3 |" ,
128+ "+----+-------------+------------+------------+--------+" ,
126129 ] ;
127130 assert_batches_eq ! ( expected, & batches) ;
128131
@@ -174,20 +177,21 @@ pub async fn test_equality_delete() {
174177 . unwrap ( ) ;
175178
176179 let batches = ctx
177- . sql ( "select product_id, sum(amount) from warehouse.test.orders group by product_id order by product_id " )
180+ . sql ( "select * from warehouse.test.orders order by id " )
178181 . await
179182 . expect ( "Failed to create plan for select" )
180183 . collect ( )
181184 . await
182185 . expect ( "Failed to execute select query" ) ;
183186
184187 let expected = [
185- "+------------+-----------------------------------+" ,
186- "| product_id | sum(warehouse.test.orders.amount) |" ,
187- "+------------+-----------------------------------+" ,
188- "| 1 | 4 |" ,
189- "| 3 | 3 |" ,
190- "+------------+-----------------------------------+" ,
188+ "+----+-------------+------------+------------+--------+" ,
189+ "| id | customer_id | product_id | date | amount |" ,
190+ "+----+-------------+------------+------------+--------+" ,
191+ "| 2 | 2 | 1 | 2020-01-01 | 1 |" ,
192+ "| 3 | 3 | 1 | 2020-01-01 | 3 |" ,
193+ "| 6 | 3 | 3 | 2020-02-02 | 3 |" ,
194+ "+----+-------------+------------+------------+--------+" ,
191195 ] ;
192196 assert_batches_eq ! ( expected, & batches) ;
193197}
0 commit comments