From 0d031636a9ed1602623b0b2b7468935cbf7f3148 Mon Sep 17 00:00:00 2001 From: JT Date: Tue, 12 Oct 2021 08:55:14 +1300 Subject: [PATCH] Error on missing column during cell path --- TODO.md | 2 +- src/tests.rs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index a580743004..fd65445985 100644 --- a/TODO.md +++ b/TODO.md @@ -27,9 +27,9 @@ - [x] Source - [x] Error shortcircuit (stopping on first error). Revised: errors emit first, but can be seen by commands. - [x] Value serialization +- [x] Handling rows with missing columns during a cell path - [ ] Input/output types - [ ] Support for `$in` -- [ ] Handling rows with missing columns during a cell path - [ ] ctrl-c support - [ ] operator overflow - [ ] finish operator type-checking diff --git a/src/tests.rs b/src/tests.rs index f879214721..5da55fa5ae 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -666,3 +666,11 @@ fn earlier_errors() -> TestResult { "int", ) } + +#[test] +fn missing_column_error() -> TestResult { + fail_test( + r#"([([[name, size]; [ABC, 10], [DEF, 20]]).1, ([[name]; [HIJ]]).0]).size | table"#, + "cannot find column", + ) +}