Skip to content

Commit 375dc81

Browse files
committed
Fixup use
1 parent 0751384 commit 375dc81

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

datafusion/tests/sql/projection.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
use datafusion::logical_plan::LogicalPlanBuilder;
18+
use datafusion::logical_plan::{LogicalPlanBuilder, UNNAMED_TABLE};
19+
use tempfile::TempDir;
1920

2021
use super::*;
2122

@@ -179,7 +180,7 @@ async fn projection_on_table_scan() -> Result<()> {
179180
#[tokio::test]
180181
async fn preserve_nullability_on_projection() -> Result<()> {
181182
let tmp_dir = TempDir::new()?;
182-
let ctx = create_ctx(&tmp_dir, 1).await?;
183+
let ctx = partitioned_csv::create_ctx(&tmp_dir, 1).await?;
183184

184185
let schema: Schema = ctx.table("test").unwrap().schema().clone().into();
185186
assert!(!schema.field_with_name("c1")?.is_nullable());
@@ -254,3 +255,13 @@ async fn projection_on_memory_scan() -> Result<()> {
254255

255256
Ok(())
256257
}
258+
259+
fn assert_fields_eq(plan: &LogicalPlan, expected: Vec<&str>) {
260+
let actual: Vec<String> = plan
261+
.schema()
262+
.fields()
263+
.iter()
264+
.map(|f| f.name().clone())
265+
.collect();
266+
assert_eq!(actual, expected);
267+
}

0 commit comments

Comments
 (0)