File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ use super::Binder;
1010use crate :: expression:: ScalarExpression ;
1111use crate :: storage:: Storage ;
1212use crate :: types:: LogicalType ;
13+ use crate :: types:: value:: DataValue ;
1314
1415impl < S : Storage > Binder < S > {
1516 #[ async_recursion]
@@ -135,6 +136,7 @@ impl<S: Storage> Binder<S> {
135136 } ;
136137 match arg_expr {
137138 FunctionArgExpr :: Expr ( expr) => args. push ( self . bind_expr ( expr) . await ?) ,
139+ FunctionArgExpr :: Wildcard => args. push ( Self :: wildcard_expr ( ) ) ,
138140 _ => todo ! ( )
139141 }
140142 }
@@ -174,4 +176,8 @@ impl<S: Storage> Binder<S> {
174176 _ => todo ! ( ) ,
175177 } )
176178 }
179+
180+ fn wildcard_expr ( ) -> ScalarExpression {
181+ ScalarExpression :: Constant ( Arc :: new ( DataValue :: Utf8 ( Some ( "*" . to_string ( ) ) ) ) )
182+ }
177183}
Original file line number Diff line number Diff line change @@ -227,6 +227,10 @@ mod test {
227227 let tuples_count_agg = kipsql. run ( "select count(d) from t2" ) . await ?;
228228 println ! ( "{}" , create_table( & tuples_count_agg) ) ;
229229
230+ println ! ( "count wildcard agg:" ) ;
231+ let tuples_count_wildcard_agg = kipsql. run ( "select count(*) from t2" ) . await ?;
232+ println ! ( "{}" , create_table( & tuples_count_wildcard_agg) ) ;
233+
230234 println ! ( "count distinct agg:" ) ;
231235 let tuples_count_distinct_agg = kipsql. run ( "select count(distinct d) from t2" ) . await ?;
232236 println ! ( "{}" , create_table( & tuples_count_distinct_agg) ) ;
You can’t perform that action at this time.
0 commit comments