Bugfixes:
-
Now correctly translating
ALTER TABLE ADDon DuckDB when adding multiple columns at once. -
Now correctly translating
ALTER TABLE ALTER COLUMNon DuckDB. -
Removing parentheses in CTAS with ORDER BY on InterSystems IRIS
Bugfixes:
- Translating
FLOATtoDOUBLEon DataBricks (Spark), because DataBricksFLOATis single precision while SQL ServerFLOATis double precision.
Bugfixes:
- Fix and simplify support for CTEs in DDL statements for InterSystems IRIS.
Bugfixes:
-
On DataBricks, a translation of
DATEADD()now returns aDATEif the input was aDATE, to be consistent with other platforms. (Requires input field name to end with '_date') -
When creating emulated temp tables on IRIS, will first attempt to drop (if exist). This follows behavior for Oracle, Spark, and BigQuery.
-
Fixing translation of
NEWID()andRAND()on IRIS.
Bugfixes:
- Some additional translation rules for InterSystems IRIS.
Changes:
-
When creating emulated temp tables (Oracle, Spark, BigQuery), will first attempt to drop (if exist). This is to clean up any orphan tables from a previous (unsuccesful) run.
-
Adding tentative support for InterSystems IRIS. Could still be removed.
Bugfixes:
- On Snowflake, fixed 'This session does not have a current schema' error when translating legacy
IF OBJECT_ID('tempdb..#table', 'U') IS NOT NULL DROP TABLE #table;
Changes:
- Changing Spark translation of
DATEADD()fromDATE_ADD()toDATEADD()as required by some but not all Databricks instances.
Bugfixes:
-
Fixed DuckDb translation of
CAST(CONCATENATE(...) AS DATE). -
Fix Snowflake and DataBricks translation of
CAST(... AS DATE)when...is a literal.
Changes:
-
Adding translation for bitwise AND operator (
&). -
Changing temp table field name maximum length to 63-8 for throwing warnings (was 30-8). Oracle changed it's limit from 30 to 128 in version 12.2, which was released in 2021. The new limit comes from PostgreSQL, which by default allows for 63 characters. All other supported DBMSs allow for longer names.
Bugfixes:
-
For SQLite, now translating
ALTER TABLE ALTER COLUMN BIGINTto dummy statement (SELECT 0;), since all integer types are the same on SQLite. -
Fixed translation of
ALTER TABLE ALTER COLUMNon PostgreSQL. -
More robust detection of string concatenation for BigQuery.
Changes:
- Adding datetime calculations to Spark translation.
Bugfixes:
-
Fix translation of
NEWID()for DuckDB. -
Fix
LEFT()andRIGHT()translation on Spark. -
Fix some date functions on SQLite.
-
Fix
DROP TABLE IF EXISTSandCREATE TABLE IF EXISTStranslation for Synapse.
Changes:
-
Adding support for
ALTER TABLE ADD COLUMNfor PostgreSQL, even though it is not correct OhdsiSql (because it is not valid SQL Server SQL). -
Removing translation of
DELETEandINSERTrules for DataBricks as no longer needed.
Bugfixes:
- Fix translation of
ALTER TABLE ADD CONTRAINTon Postgres, which was broken by v1.16.0.
Changes:
-
Adding support for
ALTER TABLE ADDfor SQLite and PostgreSQL. -
The
render(),translate(), andtranslateSingleStatement()functions now preserve attributes of the SQL object. -
Adding support for
IIFfor 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 TABLEfor PostgreSQL.
Bugfixes:
- Fixing translation of
DROP TABLE IF EXISTSon Netezza.
Changes:
-
Added translation of
charindexfor 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 ... INSERTon Snowflake. -
Fixed translation of some functions on Snowflake casting to
NUMERICinstead ofFLOAT.
Changes:
-
Adding translation of
TRY_CAST(). -
The
loadRenderTranslateSql()function now also looks in thesqlfolder of the package, so SQL files no longer have to be in thesql/sql_serversubfolder. -
Ensuring result of
YEAR(),MONTH(),DAY(), andDATEPART()equivalents return integers on SQLite. -
Ensuring interval is integer on BigQuery.
Changes:
-
Removing parentheses around subqueries for
UNIONandUNION ALLon SQLite, which otherwise would cause an error. -
Preventing translating SQL twice by adding attribute to output string.
Bugfixes:
- Fixing translation of
INTERSECTon BigQuery.
Changes:
-
Added translation for
SELECT *,pattern for Oracle. -
Switched Oracle translation of
SELECT TOPfromWHERE ROWNUM <=toFETCH FIRST ROWS ONLY. -
Added translation of
DATEPART()to all dialects. -
Added translation patterns to avoid alias conflicts when using
dbplyron 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 EXISTSandCREATE TABLE IF NOT EXISTSto old syntax.
Bugfixes:
-
Fixed erroneously identifying parts of quoted text as start of SQL comments.
-
Fixed translation of
INSERT INTOwith more than one CTE for Spark. -
Fixed translation of
SELECT TOPon 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
checkmatepackage. -
Fixed error about
targetDialecttypes 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 TABLEstatements specifying a field can be NULL on BigQuery. -
Fixes translation of
CAST('20000101' AS DATE)on Oracle.
Changes:
-
Added additional logic for
INSERTstatements on Spark, including the newsparkHandleInsert()function. -
Supporting
DROP TABLE IF EXISTStranslation 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
DATEFROMPARTSandDATETIMEFROMPARTStranslation for newer SQLite versions by first converting toINTbefore 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
tempEmulationSchemaoption. -
Workaround for
SUBSTR()function bug in newer versions of SQLite (by explicitly casting string to typeSTRING).
Changes:
-
Deprecating
oracleTempSchemaargument in various functions in favor oftempEmulationSchemaschema, which can also be set globally using thesqlRenderTempEmulationSchemaoption. -
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,
DATEADDandCONVERTfunctions now cast toREAL(used to represent DATE / DATETIME). -
On SQLite,
DATEADDfunction 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.
-
ISNUMERICtranslation implemented for Impala, Netezza, and BigQuery. -
Performance improvement for Impala temp tables (
CREATE TABLE ... STORED AS PARQUET). -
Adding functions
renderandtranslatethat output strings instead of lists. DeprecatingrenderSqlandtranslateSql. -
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
sourceDialectargument. -
Added translation for
CONCATfunction 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