Skip to content

Commit

Permalink
Regenerating JAR file. Fixing broken unit tests. Increasing version n…
Browse files Browse the repository at this point in the history
…umber.
  • Loading branch information
Schuemie authored and Schuemie committed Jan 10, 2022
1 parent f26071e commit cd76659
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 11 deletions.
10 changes: 7 additions & 3 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: SqlRender
Type: Package
Title: Rendering Parameterized SQL and Translation to Dialects
Version: 1.8.3
Date: 2022-01-07
Version: 1.9.0
Date: 2022-01-10
Authors@R: c(
person("Martijn", "Schuemie", , "[email protected]", role = c("aut", "cre")),
person("Marc", "Suchard", role = c("aut"))
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
SqlRender 1.9.0
===============

Changes:

1. Added additional logic for `INSERT` statements on Spark, including the new `sparkHandleInsert()` function.


SqlRender 1.8.3
===============

Expand Down
2 changes: 1 addition & 1 deletion inst/csv/jarChecksum.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
449a75aa3f7f45ae30048e188839e38cac86ebf12d6fcc961fe3b2dea2ee9eac
ad54a6bd6411c7d12b4a20a7d36b6be6015793dda9a8216d026a64cc2d929c07
Binary file modified inst/java/SqlRender.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>org.ohdsi.sql</groupId>
<artifactId>SqlRender</artifactId>
<packaging>jar</packaging>
<version>1.8.3-SNAPSHOT</version>
<version>1.9.0-SNAPSHOT</version>
<name>SqlRender</name>
<scm>
<connection>scm:git:https://github.com/OHDSI/SqlRender</connection>
Expand Down
7 changes: 3 additions & 4 deletions tests/testthat/test-translateSql.R
Original file line number Diff line number Diff line change
Expand Up @@ -1903,21 +1903,21 @@ test_that("translate sql server -> redshift hint SORTKEY on CREATE TABLE", {
sql <- translate("--HINT SORT_ON_KEY(INTERLEAVED:start_date)\nCREATE TABLE cdm.my_table (row_id INT, start_date);",
targetDialect = "redshift")
expect_equal_ignore_spaces(sql,
"--HINT SORT_ON_KEY(INTERLEAVED:start_date)\nCREATE TABLE cdm.my_table (row_id INT, start_date)\n\nINTERLEAVED SORTKEY(start_date);")
"--HINT SORT_ON_KEY(INTERLEAVED:start_date)\nCREATE TABLE cdm.my_table (row_id INT, start_date)\nINTERLEAVED SORTKEY(start_date);")
})

test_that("translate sql server -> pdw hint DISTKEY + SORTKEY on CREATE TABLE", {
sql <- translate("--HINT DISTRIBUTE_ON_KEY(row_id) SORT_ON_KEY(start_date)\nCREATE TABLE my_table (row_id INT, start_date DATE);",
targetDialect = "pdw")
expect_equal_ignore_spaces(sql,
"--HINT DISTRIBUTE_ON_KEY(row_id) SORT_ON_KEY(start_date)\n\nIF XACT_STATE() = 1 COMMIT; CREATE TABLE my_table (row_id INT, start_date DATE)\nWITH (DISTRIBUTION = HASH(row_id));")
"--HINT DISTRIBUTE_ON_KEY(row_id) SORT_ON_KEY(start_date)\nIF XACT_STATE() = 1 COMMIT; CREATE TABLE my_table (row_id INT, start_date DATE)\nWITH (DISTRIBUTION = HASH(row_id));")
})

test_that("translate sql server -> pdw hint DISTKEY + SORTKEY on CTAS", {
sql <- translate("--HINT DISTRIBUTE_ON_KEY(row_id) SORT_ON_KEY(start_date)\nSELECT * INTO #my_table FROM other_table;",
targetDialect = "pdw")
expect_equal_ignore_spaces(sql,
"--HINT DISTRIBUTE_ON_KEY(row_id) SORT_ON_KEY(start_date)\n\nIF XACT_STATE() = 1 COMMIT; CREATE TABLE #my_table WITH (LOCATION = USER_DB, DISTRIBUTION = HASH(row_id)) AS\nSELECT\n * \nFROM\n other_table;")
"--HINT DISTRIBUTE_ON_KEY(row_id) SORT_ON_KEY(start_date)\nIF XACT_STATE() = 1 COMMIT; CREATE TABLE #my_table WITH (LOCATION = USER_DB, DISTRIBUTION = HASH(row_id)) AS\nSELECT\n * \nFROM\n other_table;")
})

test_that("translate sql server -> redshift CONVERT to DATE", {
Expand Down Expand Up @@ -2689,7 +2689,6 @@ select o.coh_id, 706 as analysis_id into #results_dist_706 from valueStats s
join overallStats o on s.coh_id = o.coh_id;", targetDialect = "hive")
expect_equal_ignore_spaces(sql,
"DROP TABLE IF EXISTS cteRawData; DROP TABLE IF EXISTS overallStats; DROP TABLE IF EXISTS valueStats;
CREATE TEMPORARY TABLE cteRawData AS select coh_id FROM raw_706;
CREATE TEMPORARY TABLE overallStats AS select coh_id from cteRawData;
CREATE TEMPORARY TABLE valueStats AS select total FROM (select coh_id FROM cteRawData GROUP BY coh_id) D;
Expand Down

0 comments on commit cd76659

Please sign in to comment.