mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-08 01:15:00 +00:00
Change TIMESTAMP
and TIME
parsing so that time zone information is preserved (#641)
* 640 Fixing time zone printing format for TIMESTAMP and TIME * 640 Removing unnecessary changes * Update src/ast/data_type.rs Fix comment typo Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
This commit is contained in:
parent
3beecc0a7a
commit
95464ec72c
6 changed files with 141 additions and 41 deletions
|
@ -139,7 +139,7 @@ fn parse_create_table_with_defaults() {
|
|||
},
|
||||
ColumnDef {
|
||||
name: "last_update".into(),
|
||||
data_type: DataType::Timestamp,
|
||||
data_type: DataType::Timestamp(TimezoneInfo::WithoutTimeZone),
|
||||
collation: None,
|
||||
options: vec![
|
||||
ColumnOptionDef {
|
||||
|
@ -212,7 +212,7 @@ fn parse_create_table_from_pg_dump() {
|
|||
activebool BOOLEAN DEFAULT true NOT NULL, \
|
||||
create_date DATE DEFAULT CAST(now() AS DATE) NOT NULL, \
|
||||
create_date1 DATE DEFAULT CAST(CAST('now' AS TEXT) AS DATE) NOT NULL, \
|
||||
last_update TIMESTAMP DEFAULT now(), \
|
||||
last_update TIMESTAMP WITHOUT TIME ZONE DEFAULT now(), \
|
||||
release_year public.year, \
|
||||
active INT\
|
||||
)");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue