fn execute(&self) -> Result<Vec<RecordBatch>> {
// TODO(ywq)
let outer_table = self.left.execute()?;
let inner_table = self.right.execute()?;
let batches: Vec<RecordBatch> = vec![];
for outer in &outer_table {
for inner in &inner_table {
let mut columns = vec![];
let left_rows = outer.num_rows();
let right_rows = inner.num_rows();
println!("{} {}", left_rows, right_rows);
for i in 0..self.left.schema().fields().len() {
let array = outer.column(i);
// vector init
for j in 0..right_rows {
// push to vector
}
// push to columns
}
for i in 0..self.right.schema().fields().len() {
let array = inner.column(i);
// vector init
for j in 0..left_rows {
// push to vector
}
// push to columns
}
}
}
Ok(batches)
}
The execution process will like this, but I was struggled in rust(as I am a rust newbee).
The execution process will like this, but I was struggled in rust(as I am a rust newbee).