Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#91: Add tests for DATEADD function #92

Merged
merged 6 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dependencies_update.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions dependencies.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 19 additions & 14 deletions doc/changes/changes_1.0.6.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Tableau Connector 1.0.6, released 2024-??-??
# Tableau Connector 1.0.6, released 2024-08-09

Code name: Upgrade dependencies
Code name: Support function `DATEPARSE`

## Summary

This release upgrades dependencies.
This release adds support for Tableau's `DATEPARSE` function. This function allows parsing a string as a timestamp. Please note that you need to use a format string supported by Exasol (e.g. `yyyy-mm-dd hh:mi:ss`), see [documentation](https://docs.exasol.com/db/latest/sql_references/formatmodels.htm#DateTimeFormatModels).

This release also upgrades dependencies.

## Features

* #91: Added support for function `DATEPARSE`
* #77: Test with Exasol's `TIMESTAMP(9)` data type

## Dependency Updates
Expand All @@ -16,16 +19,17 @@ This release upgrades dependencies.

#### Runtime Dependency Updates

* Updated `com.exasol:exasol-jdbc:7.1.20` to `24.1.0`
* Updated `com.exasol:exasol-jdbc:7.1.20` to `24.1.1`

#### Test Dependency Updates

* Updated `org.junit.jupiter:junit-jupiter:5.10.1` to `5.10.2`
* Updated `org.hamcrest:hamcrest:2.2` to `3.0`
* Updated `org.junit.jupiter:junit-jupiter:5.10.1` to `5.10.3`

#### Plugin Dependency Updates

* Updated `com.exasol:error-code-crawler-maven-plugin:1.3.1` to `2.0.3`
* Updated `com.exasol:project-keeper-maven-plugin:3.0.0` to `4.3.2`
* Updated `com.exasol:project-keeper-maven-plugin:3.0.0` to `4.3.3`
* Updated `org.apache.maven.plugins:maven-compiler-plugin:3.11.0` to `3.13.0`
* Updated `org.apache.maven.plugins:maven-enforcer-plugin:3.4.1` to `3.5.0`
* Updated `org.apache.maven.plugins:maven-surefire-plugin:3.2.3` to `3.2.5`
Expand All @@ -38,23 +42,24 @@ This release upgrades dependencies.

#### Test Dependency Updates

* Updated `com.exasol:exasol-testcontainers:7.0.0` to `7.1.0`
* Updated `com.exasol:exasol-testcontainers:7.0.0` to `7.1.1`
* Updated `com.exasol:test-db-builder-java:3.5.3` to `3.5.4`
* Updated `com.fasterxml.jackson.core:jackson-databind:2.16.1` to `2.17.1`
* Updated `com.fasterxml.jackson.core:jackson-databind:2.16.1` to `2.17.2`
* Updated `commons-io:commons-io:2.15.1` to `2.16.1`
* Updated `io.github.bonigarcia:webdrivermanager:5.6.3` to `5.8.0`
* Updated `io.github.bonigarcia:webdrivermanager:5.6.3` to `5.9.2`
* Added `org.bouncycastle:bcpkix-jdk18on:1.78.1`
* Removed `org.bouncycastle:bcprov-jdk15on:1.70`
* Updated `org.hamcrest:hamcrest:2.2` to `3.0`
* Updated `org.json:json:20231013` to `20240303`
* Updated `org.junit.jupiter:junit-jupiter:5.10.1` to `5.10.2`
* Updated `org.junit.jupiter:junit-jupiter:5.10.1` to `5.10.3`
* Updated `org.mockito:mockito-junit-jupiter:5.9.0` to `5.12.0`
* Updated `org.seleniumhq.selenium:selenium-java:4.16.1` to `4.21.0`
* Updated `org.testcontainers:junit-jupiter:1.19.3` to `1.19.8`
* Updated `org.seleniumhq.selenium:selenium-java:4.16.1` to `4.23.0`
* Updated `org.testcontainers:junit-jupiter:1.19.3` to `1.20.1`

#### Plugin Dependency Updates

* Updated `com.exasol:error-code-crawler-maven-plugin:1.3.1` to `2.0.3`
* Updated `com.exasol:project-keeper-maven-plugin:3.0.0` to `4.3.2`
* Updated `com.exasol:project-keeper-maven-plugin:3.0.0` to `4.3.3`
* Updated `org.apache.maven.plugins:maven-compiler-plugin:3.11.0` to `3.13.0`
* Updated `org.apache.maven.plugins:maven-enforcer-plugin:3.4.1` to `3.5.0`
* Updated `org.apache.maven.plugins:maven-surefire-plugin:3.2.3` to `3.2.5`
Expand All @@ -68,7 +73,7 @@ This release upgrades dependencies.
#### Plugin Dependency Updates

* Updated `com.exasol:error-code-crawler-maven-plugin:1.3.1` to `2.0.3`
* Updated `com.exasol:project-keeper-maven-plugin:3.0.0` to `4.3.2`
* Updated `com.exasol:project-keeper-maven-plugin:3.0.0` to `4.3.3`
* Updated `org.apache.maven.plugins:maven-compiler-plugin:3.11.0` to `3.13.0`
* Updated `org.apache.maven.plugins:maven-enforcer-plugin:3.4.1` to `3.5.0`
* Updated `org.apache.maven.plugins:maven-surefire-plugin:3.2.3` to `3.2.5`
Expand Down
10 changes: 9 additions & 1 deletion javascript-test/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions jdbc-kerberos-setup-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>2.2</version>
<version>3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.10.2</version>
<version>5.10.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.exasol</groupId>
<artifactId>exasol-jdbc</artifactId>
<version>24.1.0</version>
<version>24.1.1</version>
<scope>runtime</scope>
</dependency>
</dependencies>
Expand All @@ -36,7 +36,7 @@
<plugin>
<groupId>com.exasol</groupId>
<artifactId>project-keeper-maven-plugin</artifactId>
<version>4.3.2</version>
<version>4.3.3</version>
<executions>
<execution>
<goals>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<plugin>
<groupId>com.exasol</groupId>
<artifactId>project-keeper-maven-plugin</artifactId>
<version>4.3.2</version>
<version>4.3.3</version>
<executions>
<execution>
<goals>
Expand Down
5 changes: 5 additions & 0 deletions src/exasol_jdbc/dialect.tdd
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,11 @@
<argument type='str' />
<argument type='localint' />
</function>
<date-function name='DATEPARSE' return-type='datetime'>
<formula>TO_TIMESTAMP(%2, %1)</formula>
<argument type='localstr' />
<argument type='str' />
</date-function>
<date-function name='DATEADD' return-type='datetime'>
<formula>(%3 + %2 * INTERVAL &apos;1&apos; %1)</formula>
<formula part='quarter'>ADD_MONTHS(%3, (3 * %2))</formula>
Expand Down
5 changes: 5 additions & 0 deletions src/exasol_odbc/dialect.tdd
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,11 @@
<argument type='str' />
<argument type='localint' />
</function>
<date-function name='DATEPARSE' return-type='datetime'>
<formula>TO_TIMESTAMP(%2, %1)</formula>
<argument type='localstr' />
<argument type='str' />
</date-function>
<date-function name='DATEADD' return-type='datetime'>
<formula>(%3 + %2 * INTERVAL &apos;1&apos; %1)</formula>
<formula part='quarter'>ADD_MONTHS(%3, (3 * %2))</formula>
Expand Down
16 changes: 8 additions & 8 deletions tableau-server-GUI-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.21.0</version>
<version>4.23.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>2.2</version>
<version>3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.10.2</version>
<version>5.10.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.8.0</version>
<version>5.9.2</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand Down Expand Up @@ -64,13 +64,13 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.19.8</version>
<version>1.20.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.exasol</groupId>
<artifactId>exasol-testcontainers</artifactId>
<version>7.1.0</version>
<version>7.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -83,7 +83,7 @@
<!-- Upgrade to fix CVE-2020-25649, CVE-2020-36518, CVE-2022-42003, CVE-2022-42004 -->
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -99,7 +99,7 @@
<plugin>
<groupId>com.exasol</groupId>
<artifactId>project-keeper-maven-plugin</artifactId>
<version>4.3.2</version>
<version>4.3.3</version>
<executions>
<execution>
<goals>
Expand Down
11 changes: 11 additions & 0 deletions tdvt_jdbc/config/exasol_jdbc.ini
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,14 @@ TDS = cast_calcs.exasol_jdbc.tds
TestPath = exprtests/regexcalcs
# Tests fail because of different regular expression behavior.
Exclusions = string.regex.icu_fallback,string.regexp.match.extended,string.regexp.extract_nth.extended,string.regexp.replace.extended,string.regexp.extract.extended

[TestDateParse]
Type = expression
Name = TestDateParse.
TDS = cast_calcs.exasol_jdbc.tds
TestPath = exprtests/dateparse
# Excluding tests for hour, weekday:
# Exasol expects 'MI' as pattern for minutes instead of 'mm'
# Queries fail with error "data exception - Format appears twice"
# Excluding tests for year and month: Exasol expects pattern 'yyyy' or 'yy' instead of 'y' for year, 'mm' instead of 'm' for month and 'dd' instead of 'd' for day.
Exclusions = date.dateparse.hour, date.dateparse.weekday, date.dateparse.year, date.dateparse.month
6 changes: 0 additions & 6 deletions tdvt_odbc/Notes.txt

This file was deleted.

11 changes: 11 additions & 0 deletions tdvt_odbc/config/exasol_odbc.ini
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,14 @@ TDS = cast_calcs.exasol_odbc.tds
TestPath = exprtests/regexcalcs
# Tests fail because of different regular expression behavior.
Exclusions = string.regex.icu_fallback,string.regexp.match.extended,string.regexp.extract_nth.extended,string.regexp.replace.extended,string.regexp.extract.extended

[TestDateParse]
Type = expression
Name = TestDateParse.
TDS = cast_calcs.exasol_jdbc.tds
TestPath = exprtests/dateparse
# Excluding tests for hour, weekday:
# Exasol expects 'MI' as pattern for minutes instead of 'mm'
# Queries fail with error "data exception - Format appears twice"
# Excluding tests for year and month: Exasol expects pattern 'yyyy' or 'yy' instead of 'y' for year, 'mm' instead of 'm' for month and 'dd' instead of 'd' for day.
Exclusions = date.dateparse.hour, date.dateparse.weekday, date.dateparse.year, date.dateparse.month
Empty file modified tools/run_tdvt_tests.sh
100644 → 100755
Empty file.
Loading