Skip to content

Commit c16bf46

Browse files
committed
add more
Signed-off-by: Baris Palaska <barispalaska@gmail.com>
1 parent 7820020 commit c16bf46

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

vortex-array/public-api.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22194,7 +22194,7 @@ pub fn vortex_array::Array<vortex_array::arrays::Struct>::with_column(&self, imp
2219422194

2219522195
impl vortex_array::Array<vortex_array::arrays::Struct>
2219622196

22197-
pub fn vortex_array::Array<vortex_array::arrays::Struct>::into_record_batch_with_schema(self, impl core::convert::AsRef<arrow_schema::schema::Schema>) -> vortex_error::VortexResult<arrow_array::record_batch::RecordBatch>
22197+
pub fn vortex_array::Array<vortex_array::arrays::Struct>::into_record_batch_with_schema(self, impl core::convert::AsRef<arrow_schema::schema::Schema>, &vortex_session::VortexSession) -> vortex_error::VortexResult<arrow_array::record_batch::RecordBatch>
2219822198

2219922199
impl vortex_array::Array<vortex_array::arrays::VarBin>
2220022200

vortex-array/src/arrow/record_batch.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use arrow_array::cast::AsArray;
66
use arrow_schema::DataType;
77
use arrow_schema::Schema;
88
use vortex_error::VortexResult;
9+
use vortex_session::VortexSession;
910

10-
use crate::LEGACY_SESSION;
1111
use crate::VortexSessionExecute;
1212
use crate::array::IntoArray;
1313
use crate::arrays::StructArray;
@@ -17,11 +17,12 @@ impl StructArray {
1717
pub fn into_record_batch_with_schema(
1818
self,
1919
schema: impl AsRef<Schema>,
20+
session: &VortexSession,
2021
) -> VortexResult<RecordBatch> {
2122
let data_type = DataType::Struct(schema.as_ref().fields.clone());
2223
let array_ref = self
2324
.into_array()
24-
.execute_arrow(Some(&data_type), &mut LEGACY_SESSION.create_execution_ctx())?;
25+
.execute_arrow(Some(&data_type), &mut session.create_execution_ctx())?;
2526
Ok(RecordBatch::from(array_ref.as_struct()))
2627
}
2728
}
@@ -35,6 +36,7 @@ mod tests {
3536
use arrow_schema::FieldRef;
3637
use arrow_schema::Schema;
3738

39+
use crate::LEGACY_SESSION;
3840
use crate::arrow::record_batch::StructArray;
3941
use crate::builders::ArrayBuilder;
4042
use crate::builders::ListBuilder;
@@ -69,7 +71,9 @@ mod tests {
6971
DataType::LargeListView(FieldRef::new(Field::new_list_field(DataType::Int32, false))),
7072
true,
7173
)]));
72-
let rb = array.into_record_batch_with_schema(arrow_schema).unwrap();
74+
let rb = array
75+
.into_record_batch_with_schema(arrow_schema, &LEGACY_SESSION)
76+
.unwrap();
7377

7478
let xs = rb.column(0);
7579
assert_eq!(

0 commit comments

Comments
 (0)