Skip to content

Commit

Permalink
[task apache#8213]Part of Port tests in select.rs to sqllogictest
Browse files Browse the repository at this point in the history
Signed-off-by: tangruilin <[email protected]>
  • Loading branch information
Tangruilin committed Jan 25, 2024
1 parent d6ab343 commit de686a3
Show file tree
Hide file tree
Showing 3 changed files with 348 additions and 642 deletions.
15 changes: 0 additions & 15 deletions datafusion/core/tests/sql/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,21 +322,6 @@ async fn register_alltypes_parquet(ctx: &SessionContext) {
.unwrap();
}

/// Return a new table provider that has a single Int32 column with
/// values between `seq_start` and `seq_end`
pub fn table_with_sequence(
seq_start: i32,
seq_end: i32,
) -> Result<Arc<dyn TableProvider>> {
let schema = Arc::new(Schema::new(vec![Field::new("i", DataType::Int32, true)]));
let arr = Arc::new(Int32Array::from((seq_start..=seq_end).collect::<Vec<_>>()));
let partitions = vec![vec![RecordBatch::try_new(
schema.clone(),
vec![arr as ArrayRef],
)?]];
Ok(Arc::new(MemTable::try_new(schema, partitions)?))
}

pub struct ExplainNormalizer {
replacements: Vec<(String, String)>,
}
Expand Down
Loading

0 comments on commit de686a3

Please sign in to comment.