Struct arrow_udf_js::Runtime
source · pub struct Runtime { /* private fields */ }Expand description
The JS UDF runtime.
Implementations§
source§impl Runtime
impl Runtime
sourcepub fn add_function(
&mut self,
name: &str,
return_type: DataType,
mode: CallMode,
code: &str
) -> Result<()>
pub fn add_function( &mut self, name: &str, return_type: DataType, mode: CallMode, code: &str ) -> Result<()>
Add a JS function.
sourcepub fn add_function_with_handler(
&mut self,
name: &str,
return_type: DataType,
mode: CallMode,
code: &str,
handler: &str
) -> Result<()>
pub fn add_function_with_handler( &mut self, name: &str, return_type: DataType, mode: CallMode, code: &str, handler: &str ) -> Result<()>
Add a JS function with custom handler name
sourcepub fn call(&self, name: &str, input: &RecordBatch) -> Result<RecordBatch>
pub fn call(&self, name: &str, input: &RecordBatch) -> Result<RecordBatch>
Call the JS UDF.
sourcepub fn call_table_function<'a>(
&'a self,
name: &'a str,
input: &'a RecordBatch,
chunk_size: usize
) -> Result<RecordBatchIter<'a>>
pub fn call_table_function<'a>( &'a self, name: &'a str, input: &'a RecordBatch, chunk_size: usize ) -> Result<RecordBatchIter<'a>>
Call a table function.
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more