@@ -11,6 +11,7 @@ use partiql_logical as logical;
11
11
use partiql_value:: Value ;
12
12
use std:: borrow:: Cow ;
13
13
14
+ use partiql_catalog:: context:: SessionContext ;
14
15
use std:: error:: Error ;
15
16
use std:: fmt:: Debug ;
16
17
use std:: fs:: File ;
@@ -98,7 +99,11 @@ impl BaseTableFunctionInfo for ReadIonFunction {
98
99
pub ( crate ) struct EvalFnReadIon { }
99
100
100
101
impl BaseTableExpr for EvalFnReadIon {
101
- fn evaluate ( & self , args : & [ Cow < Value > ] ) -> BaseTableExprResult {
102
+ fn evaluate < ' c > (
103
+ & self ,
104
+ args : & [ Cow < Value > ] ,
105
+ _ctx : & ' c dyn SessionContext < ' c > ,
106
+ ) -> BaseTableExprResult < ' c > {
102
107
if let Some ( arg1) = args. first ( ) {
103
108
match arg1. as_ref ( ) {
104
109
Value :: String ( path) => parse_ion_file ( path) ,
@@ -155,11 +160,13 @@ fn parse_ion_buff<'a, I: 'a + ToIonDataSource>(input: I) -> BaseTableExprResult<
155
160
mod tests {
156
161
use super :: * ;
157
162
163
+ use partiql_catalog:: context:: SystemContext ;
158
164
use partiql_catalog:: { Catalog , Extension , PartiqlCatalog } ;
159
165
use partiql_eval:: env:: basic:: MapBindings ;
166
+ use partiql_eval:: eval:: BasicContext ;
160
167
use partiql_eval:: plan:: EvaluationMode ;
161
168
use partiql_parser:: { Parsed , ParserResult } ;
162
- use partiql_value:: { bag, tuple, Value } ;
169
+ use partiql_value:: { bag, tuple, DateTime , Value } ;
163
170
164
171
#[ track_caller]
165
172
#[ inline]
@@ -189,7 +196,11 @@ mod tests {
189
196
190
197
let mut plan = planner. compile ( & logical) . expect ( "Expect no plan error" ) ;
191
198
192
- if let Ok ( out) = plan. execute_mut ( bindings) {
199
+ let sys = SystemContext {
200
+ now : DateTime :: from_system_now_utc ( ) ,
201
+ } ;
202
+ let ctx = BasicContext :: new ( bindings, sys) ;
203
+ if let Ok ( out) = plan. execute_mut ( & ctx) {
193
204
out. result
194
205
} else {
195
206
Value :: Missing
0 commit comments