Skip to content

Commit

Permalink
Some minor fixes for IRIS
Browse files Browse the repository at this point in the history
  • Loading branch information
schuemie committed Feb 17, 2025
1 parent e2315f2 commit 3ebcc38
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: SqlRender
Type: Package
Title: Rendering Parameterized SQL and Translation to Dialects
Version: 1.19.2
Date: 2025-01-30
Date: 2025-02-17
Authors@R: c(
person("Martijn", "Schuemie", , "[email protected]", role = c("aut", "cre")),
person("Marc", "Suchard", role = c("aut"))
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Bugfixes:

1. On DataBricks, a translation of `DATEADD()` now returns a `DATE` if the input was a `DATE`, to be consistent with other platforms. (Requires input field name to end with '_date')

2. When creating emulated temp tables on IRIS, will first attempt to drop (if exist). This follows behavior for Oracle, Spark, and BigQuery.

3. Fixing translation of `NEWID()` and `RAND()` on IRIS.


SqlRender 1.19.1
================
Expand Down
1 change: 0 additions & 1 deletion SqlRender.Rproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Version: 1.0
ProjectId: 172808d3-be61-43ad-8098-ce800f3e8439

RestoreWorkspace: No
SaveWorkspace: No
Expand Down
4 changes: 3 additions & 1 deletion inst/csv/replacementPatterns.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,7 @@ iris,CAST(@a AS varchar) +,CAST(@a AS varchar) ||
iris,+ CAST(@a AS varchar),|| CAST(@a AS varchar)
iris,COUNT_BIG(@a),COUNT(@a)
iris,.dbo.,.
iris,CREATE TABLE #@table (@definition),CREATE GLOBAL TEMPORARY TABLE #@table (@definition)
iris,CREATE TABLE #@table (@definition),DROP TABLE IF EXISTS #@table; CREATE GLOBAL TEMPORARY TABLE #@table (@definition)
iris,"WITH @a AS (@b), @c CREATE TABLE @d AS @e;","DROP TABLE IF EXISTS #@a;\n CREATE GLOBAL TEMPORARY TABLE #@a AS @b;\n WITH @c CREATE TABLE @d AS @e;\n DROP TABLE IF EXISTS #@a;"
iris,WITH @a AS (@b) CREATE TABLE @c AS SELECT @d;,DROP TABLE IF EXISTS #@a;\n CREATE GLOBAL TEMPORARY TABLE #@a AS @b;\n CREATE TABLE @c AS SELECT @d;\n DROP TABLE IF EXISTS #@a;
iris,"WITH @a AS (@b), @c CREATE GLOBAL TEMPORARY TABLE @d AS @e;","DROP TABLE IF EXISTS #@a;\n CREATE GLOBAL TEMPORARY TABLE #@a AS @b;\n WITH @c CREATE GLOBAL TEMPORARY TABLE @d AS @e;\n DROP TABLE IF EXISTS #@a;"
Expand Down Expand Up @@ -1438,3 +1438,5 @@ iris,STDEV_POP(@a),STDDEV_POP(@a)
iris,STDEV_SAMP(@a),STDDEV_SAMP(@a)
iris,EOMONTH(@date),LAST_DAY(@date)
iris,.DOMAIN ,."DOMAIN"
iris,NEWID(),$TSQL_NEWID()
iris,RAND(),$TSQL_NEWID()

0 comments on commit 3ebcc38

Please sign in to comment.