Changes:
-
Adding support for
ALTER TABLE ADD COLUMN
for PostgreSQL, even though it is not correct OhdsiSql (because it is not valid SQL Server SQL). -
Removing translation of
DELETE
andINSERT
rules for DataBricks as no longer needed.
Bugfixes:
- Fix translation of
ALTER TABLE ADD CONTRAINT
on Postgres, which was broken by v1.16.0.
Changes:
-
Adding support for
ALTER TABLE ADD
for SQLite and PostgreSQL. -
The
render()
,translate()
, andtranslateSingleStatement()
functions now preserve attributes of the SQL object. -
Adding support for
IIF
for Synapse. -
Translating double quotes to backticks for BigQuery.
Bugfixes:
-
Fix translation of
drvd()
for Snowflake. -
Fix translation of 'a.b.c...d' pattern for Snowflake.
Bugfixes:
- Fixing translation of
DATEADD()
for DuckDB when number to add is not an integer.
Bugfixes:
-
Fixed translation of
DATEADD()
for DuckDB when number to add is an expression instead of a verbatim number. -
Fixed Synapse option in the SqlDeveloper Shiny app.
Changes:
- Adding translation of
FROM (VALUES ...) AS drvd(...)
for PostgreSQL, SQL Server, Oracle, RedShift, SQLite, DuckDb, BigQuery, and Spark.
Bugfixes:
-
Correct translation when referring to temp table field for DBMSs that don't support temp tables (e.g.
SELECT #tmp.name FROM #tmp;
). -
Fixing '...' in table aliases generated by
dbplyr
.
Changes:
-
Adding translation of
DATEPART()
for Spark. -
Adding translation of
CEILING()
for Spark.
Bugfixes:
-
Fixing translation of
CAST(AS DATE)
on Oracle and Netezza when thing to cast is not a literal string. -
Fixing translation of
ALTER TABLE
for PostgreSQL.
Bugfixes:
- Fixing translation of
DROP TABLE IF EXISTS
on Netezza.
Changes:
-
Added translation of
charindex
for BigQuery. -
SQLite translation of
RAND()
now returns value between 0 and 1 for consistency with other platforms.
Bugfixes:
- Fixing DuckDB translation of
DATEADD()
.
Bugfixes:
-
Fixed translation of
WITH ... INSERT
on Snowflake. -
Fixed translation of some functions on Snowflake casting to
NUMERIC
instead ofFLOAT
.
Changes:
-
Adding translation of
TRY_CAST()
. -
The
loadRenderTranslateSql()
function now also looks in thesql
folder of the package, so SQL files no longer have to be in thesql/sql_server
subfolder. -
Ensuring result of
YEAR()
,MONTH()
,DAY()
, andDATEPART()
equivalents return integers on SQLite. -
Ensuring interval is integer on BigQuery.
Changes:
-
Removing parentheses around subqueries for
UNION
andUNION ALL
on SQLite, which otherwise would cause an error. -
Preventing translating SQL twice by adding attribute to output string.
Bugfixes:
- Fixing translation of
INTERSECT
on BigQuery.
Changes:
-
Added translation for
SELECT *,
pattern for Oracle. -
Switched Oracle translation of
SELECT TOP
fromWHERE ROWNUM <=
toFETCH FIRST ROWS ONLY
. -
Added translation of
DATEPART()
to all dialects. -
Added translation patterns to avoid alias conflicts when using
dbplyr
on BigQuery. -
Adding translation of SQL Server's
IIF()
shorthand for all dialects. -
As a temporary workaround for older SQL Server instances, translating
DROP TABLE IF EXISTS
andCREATE TABLE IF NOT EXISTS
to old syntax.
Bugfixes:
-
Fixed erroneously identifying parts of quoted text as start of SQL comments.
-
Fixed translation of
INSERT INTO
with more than one CTE for Spark. -
Fixed translation of
SELECT TOP
on all platforms when usingDISTINCT
.
Changes:
-
Added translation to Snowflake.
-
Added translation to Synapse.
-
Added translation to DuckDb.
Bugfixes:
- Fixed translation for
NEWID()
on BigQuery.
Bugfixes:
-
Fixed error about missing
checkmate
package. -
Fixed error about
targetDialect
types not matching (character != factor) on older R versions (< 4). -
Fixed warning about deprecated icon in Shiny app.
Changes:
- Adding input checks to all functions for more informative error messages.
Bugfixes:
-
Fixed translation of
CREATE TABLE
statements specifying a field can be NULL on BigQuery. -
Fixes translation of
CAST('20000101' AS DATE)
on Oracle.
Changes:
-
Added additional logic for
INSERT
statements on Spark, including the newsparkHandleInsert()
function. -
Supporting
DROP TABLE IF EXISTS
translation across all dialects. -
Adding translation rule for
CAST(... AS DATE)
for SQLite. -
Added
snakeCaseToCamelCaseNames()
andcamelCaseToSnakeCaseNames()
functions.
Changes:
-
Added rules for translating implicit string concatenation to BigQuery.
-
Added
getTempTablePrefix()
function.
Changes:
- Adding
listSupportedDialects()
function.
Bugfixes:
- Fix
DATEFROMPARTS
andDATETIMEFROMPARTS
translation for newer SQLite versions by first converting toINT
before converting toTEXT
.
Changes:
- Provide informative error message when Java is outdated.
Changes:
-
Added Apache Spark dialect ("spark").
-
Adding automated check whether correct Java Jar file is loaded, throws warning if not.
-
Adding translation of
CEILING()
for SQLite.
Bugfixes:
-
Fixing setting of global
tempEmulationSchema
option. -
Workaround for
SUBSTR()
function bug in newer versions of SQLite (by explicitly casting string to typeSTRING
).
Changes:
-
Deprecating
oracleTempSchema
argument in various functions in favor oftempEmulationSchema
schema, which can also be set globally using thesqlRenderTempEmulationSchema
option. -
Adding translation of DATEDIFF(YEAR, ...) and DATEDIFF(MONTH, ...) to all dialects.
-
Updated
createRWrapperForSql()
to latest SqlRender standards.
Bugfixes:
-
Fixed translation of CTE without FROM or UNION in BigQuery.
-
Fixed translation of CONVERT(DATE...) in SQLite.
-
Fixed translation of DATEDIFF with literals in SQLite.
Bugfixes:
- Fixing error when SQL is not a native character vector (e.g. when it has been created using glue).
Changes:
- Throw a more informative error message when
loadRenderTranslateSql()
cannot find the SQL file in the specified package.
Bugfixes:
-
On SQLite,
DATEADD
andCONVERT
functions now cast toREAL
(used to represent DATE / DATETIME). -
On SQLite,
DATEADD
function now works when amount to add is not a verbatim number.
Changes:
-
Adding rules for modulus operator for BigQuery.
-
Deleting UPDATE STATISTICS statement for BigQuery.
Bugfixes:
- Fixed
CAST(@a as DATE)
for 'YYYYMMDD' string dates on BigQuery.
Changes:
-
Adding support for Apache Hive LLAP.
-
Adding functions to convert camelCase to Title Case. (camelCaseToTitleCase)
Changes:
-
Added rules for SQLite for LEFT and RIGHT functions.
-
SQLite now dropping schema name when creating and dropping index (as this throws an error if left).
-
No longer automatically casting literal to TEXT in RedShift CTE. Users are required to do explicit casts instead.
-
BigQuery
insertTable()
now also uses CTAS hack. -
Added translation rules for
HASHBYTES
.
Bugfixes:
-
Fixing GETDATE translation for SQLite.
-
When calling
render
, the replacement value can now contain a $ sign. (Previously this caused an error). -
isNumeric can now also be applied to numeric fields in Postgres.
-
Better handling of illegal characters in Impala.
Changes:
- Added rules for Oracle for conditional indices.
Bugfixes:
- Fixing erroneous variable name translation for BigQuery.
Changes:
- Added rules for Impala for INTEGER NOT NULL and DOUBLE PRECISION.
Bugfixes:
- Fixed isNumeric check for Netezza
Changes:
-
Major overhaul of BigQuery translation.
-
Added support for SQLite.
-
ISNUMERIC
translation implemented for Impala, Netezza, and BigQuery. -
Performance improvement for Impala temp tables (
CREATE TABLE ... STORED AS PARQUET
). -
Adding functions
render
andtranslate
that output strings instead of lists. DeprecatingrenderSql
andtranslateSql
. -
Added function
translateSingleStatement
.
Bugfixes:
-
Dropping WHERE clause when translating CREATE INDEX for PDW.
-
Fixed PDW's equivalent of CREATE TABLE IF NOT EXISTS.
Changes:
- Added translation rules for DATETIME2.
Bugfixes:
- Fixed misspelling of DISTRIBUTE in Netezza translation rules.
Changes:
- Translation for indexes for RedShift and Impala.
- Translation for UPDATE STATISTICS.
Bugfixes:
- Fixed translation of AS when used for table names in Oracle.
Changes:
-
Improved support for Netezza.
-
Added random distribution hints for PDW, RedShift, Netezza.
-
Improved MPP index translation for PDW and Netezza.
-
Warnings about missing parameters when rendering SQL can now be turned off.
Bugfixes:
- Translation of camelCase to snake_case now adds underscore before numbers.
Changes:
-
Better handling of 'FROM DUAL' for Oracle.
-
Improved support for Netezza and Impala.
Changes:
-
Bigquery support for mismatched string and int arguments in coalesce.
-
Translate decimal to float for BigQuery.
-
Created rules to add dummy 'group by' for Oracle statements combining 'case' and 'count' to prevent Oracle from crashing.
-
Adding 'UNBOUNDED PRECEDING' to RedShift windowing functions.
Changes:
-
Added a Shiny app for developing parameterized SQL, and view how this would be rendered and translated into the various supported dialects.
-
Added support for Google BigQuery.
-
Added many more rules for Amazon RedShift, including support for optimization hints.
-
Added rules for DELETE FROM translation for Impala.
Bugfixes:
- Fixed issue when splitting SQL containing hints.
Changes:
- Added translation rules for ISNUMERIC and LOG(@expression, @base)
Bugfixes:
-
Fixed bug when trying to split SQL where reserved word 'end' is used as a field name.
-
Fixes for Impala translations.
-
Fixed translation issues for Oracle involving 'FROM DUAL'.
-
Added workaround for Oracle bug for intervals greater than 99 days.
-
Fixed bug when trying to split SQL where last line has comment but no EOL.
Changes:
-
Added ability to use regular expression in translation patterns. This allowed SELECT TOP n to be translated.
-
Deprecated
sourceDialect
argument. -
Added translation for
CONCAT
function with >2 arguments to Oracle (which only allows 2 arguments) -
Added hints for translation optimization to massive parallel platforms like RedShift
-
Throw warnings when
translateSql()
is called with variable names that are not in the SQL -
Throw warnings when table names are too long for Oracle
Bugfixes:
- Fixed translation for date functions so they will now work properly with datetime fields as well.
- Now throwing error when boolean logic cannot be parsed (instead of assuming result is TRUE)
Changes:
- Added support for Impala
Bugfixes:
- Fixed translation for DATEFROMPARTS for RedShift
Changes: initial submission to CRAN