Skip to content

Commit

Permalink
Optimizing conversion for date, time, and timestamp data types includ…
Browse files Browse the repository at this point in the history
…ing time zones
  • Loading branch information
Patrick Pichler authored and Patrick Pichler committed Apr 4, 2024
1 parent 24ed26b commit 4ef9df4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Trino/Trino.pq
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
///////////// /////////////
///////////// Title: Trino Connector for Power BI /////////////
Expand Down Expand Up @@ -290,9 +290,10 @@ GetPage = (url as text, User as text, Retries as number, Timeout as number) as t
else if Text.Contains([type], "int") then type number //TINYINT, SMALLINT, INTEGER, BIGINT
else if Text.Contains([type], "decimal") then type number //DECIMAL
else if Text.Contains([type], "boolean") then type logical //BOOLEAN
else if Text.Contains([type], "date") then type date //DATE
else if Text.Contains([type], "timestamp") then type datetime //TIMESTAMP, TIMESTAMP(P),TIMESTAMP WITH TIME ZONE, TIMESTAMP(P) WITH TIME ZONE
else if Text.Contains([type], "time") then type time //TIME, TIME(P), TIME WITH TIME ZONE
else if Value.Equals([type], "date") then type date //DATE
else if Value.Equals([type], "time") then type time //TIME, TIME(P)
else if Value.Equals([type], "timestamp") then type datetime //TIMESTAMP, TIMESTAMP(P)
else if Text.Contains([type], "with time zone") then type text //TIMESTAMP(P) WITH TIME ZONE, TIMESTAMP WITH TIME ZONE, TIME WITH TIME ZONE
else if Text.Contains([type], "real") then type number //REAL
else if Text.Contains([type], "double") then type number //DOUBLE
else if Text.Contains([type], "varbinary") then type binary //VARBINARY
Expand Down
Binary file modified Trino/bin/AnyCPU/Debug/Trino.mez
Binary file not shown.

0 comments on commit 4ef9df4

Please sign in to comment.