Skip to content

Commit

Permalink
test: repro timestamp parsing issue (#1980)
Browse files Browse the repository at this point in the history
* test: repro timestamp parsing issue

* Update prql-compiler/src/test.rs

Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>

* Update prql-compiler/src/test.rs

Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>

---------

Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
  • Loading branch information
bcho and max-sixty authored Feb 28, 2023
1 parent 340455f commit e934ce8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions prql-compiler/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3320,3 +3320,22 @@ fn test_params() {
"###
);
}

// TODO: fix this based on https://github.com/PRQL/prql/pull/1818
#[test]
#[should_panic]
fn test_datetime_parsing() {
assert_display_snapshot!(compile(r#"
from test_tables
select [date = @2022-12-31, time = @08:30, timestamp = @2020-01-01T13:19:55-0800]
"#).unwrap(),
@r###"
SELECT
DATE '2022-12-31' AS date,
TIME '08:30' AS time,
TIMESTAMP '2020-01-01T13:19:55-0800' AS timestamp
FROM
test_table
"###
);
}

0 comments on commit e934ce8

Please # to comment.