Skip to content

Commit 3ebcc38

Browse files
committed
Some minor fixes for IRIS
1 parent e2315f2 commit 3ebcc38

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Package: SqlRender
22
Type: Package
33
Title: Rendering Parameterized SQL and Translation to Dialects
44
Version: 1.19.2
5-
Date: 2025-01-30
5+
Date: 2025-02-17
66
Authors@R: c(
77
person("Martijn", "Schuemie", , "[email protected]", role = c("aut", "cre")),
88
person("Marc", "Suchard", role = c("aut"))

NEWS.md

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ Bugfixes:
55

66
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')
77

8+
2. When creating emulated temp tables on IRIS, will first attempt to drop (if exist). This follows behavior for Oracle, Spark, and BigQuery.
9+
10+
3. Fixing translation of `NEWID()` and `RAND()` on IRIS.
11+
812

913
SqlRender 1.19.1
1014
================

SqlRender.Rproj

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
Version: 1.0
2-
ProjectId: 172808d3-be61-43ad-8098-ce800f3e8439
32

43
RestoreWorkspace: No
54
SaveWorkspace: No

inst/csv/replacementPatterns.csv

+3-1
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,7 @@ iris,CAST(@a AS varchar) +,CAST(@a AS varchar) ||
13851385
iris,+ CAST(@a AS varchar),|| CAST(@a AS varchar)
13861386
iris,COUNT_BIG(@a),COUNT(@a)
13871387
iris,.dbo.,.
1388-
iris,CREATE TABLE #@table (@definition),CREATE GLOBAL TEMPORARY TABLE #@table (@definition)
1388+
iris,CREATE TABLE #@table (@definition),DROP TABLE IF EXISTS #@table; CREATE GLOBAL TEMPORARY TABLE #@table (@definition)
13891389
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;"
13901390
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;
13911391
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;"
@@ -1438,3 +1438,5 @@ iris,STDEV_POP(@a),STDDEV_POP(@a)
14381438
iris,STDEV_SAMP(@a),STDDEV_SAMP(@a)
14391439
iris,EOMONTH(@date),LAST_DAY(@date)
14401440
iris,.DOMAIN ,."DOMAIN"
1441+
iris,NEWID(),$TSQL_NEWID()
1442+
iris,RAND(),$TSQL_NEWID()

0 commit comments

Comments
 (0)