Skip to content

Commit 8dfd4a1

Browse files
Feature/126 add new hashtype functions (#133)
* #126: added new HASHTYPE_* functions * #126: added changelog, updated dependencies
1 parent 5ffa6e3 commit 8dfd4a1

File tree

12 files changed

+48
-48
lines changed

12 files changed

+48
-48
lines changed

doc/changes/changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Changes
22

3-
* [10.1.0](changes-10.1.0.md)
3+
* [10.1.0](changes-10.1.0.md)
4+
* [10.2.0](changes-10.2.0.md)

doc/changes/changes-10.2.0.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Virtual Schema Common Java 10.2.0, released 2020.07.28
2+
3+
## Features / Enhancements
4+
5+
* #126: Added capabilities for new scalar functions HASHTYPE_*.
6+
7+
## Dependency updates
8+
9+
* Added `org.junit.jupiter:junit-jupiter:5.6.2`
10+
* Updated `org.junit.jupiter:junit-jupiter-engine` from 5.6.1 to 5.6.2
11+
* Updated `org.mockito:mockito-junit-jupiter` from 3.3.3 to 3.4.4
12+
* Removed `org.junit.jupiter:junit-jupiter-engine`
13+
* Removed `org.junit.jupiter:junit-jupiter-params`
14+
* Removed `org.junit.platform:junit-platform-runner`
15+
* Removed `org.mockito:mockito-core`

pom.xml

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>com.exasol</groupId>
66
<artifactId>virtual-schema-common-java</artifactId>
7-
<version>10.1.0</version>
7+
<version>10.2.0</version>
88
<name>Common module of Exasol Virtual Schemas Adapters</name>
99
<description>This is one of the modules of Virtual Schemas Adapters. The libraries provided by this project are the
1010
foundation of the adapter development, i.e. adapters must be implemented on top of them.
@@ -14,8 +14,6 @@
1414
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1515
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1616
<java.version>11</java.version>
17-
<junit.version>5.6.2</junit.version>
18-
<maven.surefire.version>3.0.0-M4</maven.surefire.version>
1917
<gpg.skip>true</gpg.skip>
2018
</properties>
2119
<licenses>
@@ -89,32 +87,14 @@
8987
</dependency>
9088
<dependency>
9189
<groupId>org.junit.jupiter</groupId>
92-
<artifactId>junit-jupiter-engine</artifactId>
93-
<version>${junit.version}</version>
94-
<scope>test</scope>
95-
</dependency>
96-
<dependency>
97-
<groupId>org.junit.jupiter</groupId>
98-
<artifactId>junit-jupiter-params</artifactId>
99-
<version>${junit.version}</version>
100-
<scope>test</scope>
101-
</dependency>
102-
<dependency>
103-
<groupId>org.junit.platform</groupId>
104-
<artifactId>junit-platform-runner</artifactId>
105-
<version>1.6.2</version>
106-
<scope>test</scope>
107-
</dependency>
108-
<dependency>
109-
<groupId>org.mockito</groupId>
110-
<artifactId>mockito-core</artifactId>
111-
<version>3.3.3</version>
90+
<artifactId>junit-jupiter</artifactId>
91+
<version>5.6.2</version>
11292
<scope>test</scope>
11393
</dependency>
11494
<dependency>
11595
<groupId>org.mockito</groupId>
11696
<artifactId>mockito-junit-jupiter</artifactId>
117-
<version>3.3.3</version>
97+
<version>3.4.4</version>
11898
<scope>test</scope>
11999
</dependency>
120100
<dependency>
@@ -163,7 +143,7 @@
163143
<plugin>
164144
<groupId>org.apache.maven.plugins</groupId>
165145
<artifactId>maven-surefire-plugin</artifactId>
166-
<version>${maven.surefire.version}</version>
146+
<version>3.0.0-M4</version>
167147
</plugin>
168148
<plugin>
169149
<groupId>org.apache.maven.plugins</groupId>

src/main/java/com/exasol/adapter/capabilities/ScalarFunctionCapability.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ public enum ScalarFunctionCapability {
3232

3333
BIT_AND, BIT_CHECK, BIT_NOT, BIT_OR, BIT_SET, BIT_TO_NUM, BIT_XOR,
3434

35-
CASE, CURRENT_SCHEMA, CURRENT_SESSION, CURRENT_STATEMENT, CURRENT_USER, HASH_MD5, HASH_SHA, HASH_SHA1, HASH_SHA256,
36-
HASH_SHA512, HASH_TIGER, NULLIFZERO, SYS_GUID, ZEROIFNULL, JSON_VALUE, SESSION_PARAMETER;
35+
CASE, CURRENT_SCHEMA, CURRENT_SESSION, CURRENT_STATEMENT, CURRENT_USER, HASH_MD5, HASHTYPE_MD5, HASH_SHA, HASH_SHA1,
36+
HASHTYPE_SHA1, HASH_SHA256, HASHTYPE_SHA256, HASH_SHA512, HASHTYPE_SHA512, HASH_TIGER, HASHTYPE_TIGER, NULLIFZERO,
37+
SYS_GUID, ZEROIFNULL, JSON_VALUE, SESSION_PARAMETER;
3738

3839
public ScalarFunction getFunction() {
3940
return ScalarFunction.valueOf(name());

src/main/java/com/exasol/adapter/sql/ScalarFunction.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ CURRENT_TIMESTAMP, DATE_TRUNC, DAY, DAYS_BETWEEN, DBTIMEZONE, EXTRACT(false), HO
2929

3030
BIT_AND, BIT_CHECK, BIT_NOT, BIT_OR, BIT_SET, BIT_TO_NUM, BIT_XOR, //
3131

32-
CASE(false), CURRENT_SCHEMA, CURRENT_SESSION, CURRENT_STATEMENT, CURRENT_USER, HASH_MD5, HASH_SHA, HASH_SHA1,
33-
HASH_SHA256, HASH_SHA512, HASH_TIGER, NULLIFZERO, SYS_GUID, ZEROIFNULL, JSON_VALUE, SESSION_PARAMETER;
32+
CASE(false), CURRENT_SCHEMA, CURRENT_SESSION, CURRENT_STATEMENT, CURRENT_USER, HASH_MD5, HASHTYPE_MD5, HASH_SHA,
33+
HASH_SHA1, HASHTYPE_SHA1, HASH_SHA256, HASHTYPE_SHA256, HASH_SHA512, HASHTYPE_SHA512, HASH_TIGER, HASHTYPE_TIGER,
34+
NULLIFZERO, SYS_GUID, ZEROIFNULL, JSON_VALUE, SESSION_PARAMETER;
3435

3536
private final boolean isSimple;
3637

src/test/java/com/exasol/adapter/AbstractAdapterPropertiesTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.exasol.adapter;
22

3-
import static org.hamcrest.Matchers.*;
43
import static org.hamcrest.MatcherAssert.assertThat;
5-
import static org.junit.Assert.assertTrue;
4+
import static org.hamcrest.Matchers.*;
5+
import static org.junit.jupiter.api.Assertions.assertTrue;
66

77
import java.util.*;
88

src/test/java/com/exasol/adapter/RequestDispatcherTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.exasol.adapter;
22

3+
import static org.hamcrest.MatcherAssert.assertThat;
34
import static org.hamcrest.Matchers.containsString;
45
import static org.hamcrest.Matchers.startsWith;
5-
import static org.hamcrest.MatcherAssert.assertThat;
66
import static org.junit.jupiter.api.Assertions.assertAll;
77
import static org.junit.jupiter.api.Assertions.assertThrows;
88
import static org.mockito.ArgumentMatchers.any;
@@ -43,7 +43,7 @@ class RequestDispatcherTest {
4343

4444
@BeforeEach
4545
void beforeEach() {
46-
MockitoAnnotations.initMocks(this);
46+
MockitoAnnotations.openMocks(this);
4747
AdapterRegistry.getInstance().registerAdapterFactory(MOCKADAPTER,
4848
new MockInjectingAdapterFactory(this.adapterMock));
4949
}

src/test/java/com/exasol/adapter/capabilities/AggregateFunctionCapabilityTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package com.exasol.adapter.capabilities;
22

3-
import com.exasol.adapter.sql.AggregateFunction;
3+
import static org.junit.jupiter.api.Assertions.assertTrue;
4+
45
import org.junit.jupiter.api.Test;
56

6-
import static org.junit.Assert.assertTrue;
7+
import com.exasol.adapter.sql.AggregateFunction;
78

89
class AggregateFunctionCapabilityTest {
910
@Test
@@ -15,7 +16,7 @@ void testIfThereAreFunctionsWhereCapabilitiesMissing() {
1516
foundCap = true;
1617
}
1718
}
18-
assertTrue("Did not find a capability for function " + func.name(), foundCap);
19+
assertTrue(foundCap, "Did not find a capability for function " + func.name());
1920
}
2021
}
2122

src/test/java/com/exasol/adapter/capabilities/PredicateCapabilityTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package com.exasol.adapter.capabilities;
22

3-
import com.exasol.adapter.sql.Predicate;
3+
import static org.junit.jupiter.api.Assertions.assertTrue;
4+
45
import org.junit.jupiter.api.Test;
56

6-
import static org.junit.Assert.assertTrue;
7+
import com.exasol.adapter.sql.Predicate;
78

89
class PredicateCapabilityTest {
910
@Test
@@ -15,7 +16,7 @@ void testIfThereArePredicatesWhereCapabilitiesMissing() {
1516
foundCap = true;
1617
}
1718
}
18-
assertTrue("Did not find a capability for predicate " + pred.name(), foundCap);
19+
assertTrue(foundCap, "Did not find a capability for predicate " + pred.name());
1920
}
2021
}
2122

src/test/java/com/exasol/adapter/capabilities/ScalarFunctionCapabilityTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package com.exasol.adapter.capabilities;
22

3-
import com.exasol.adapter.sql.ScalarFunction;
3+
import static org.junit.jupiter.api.Assertions.assertEquals;
4+
import static org.junit.jupiter.api.Assertions.assertTrue;
5+
46
import org.junit.jupiter.api.Test;
57

6-
import static org.junit.Assert.assertEquals;
7-
import static org.junit.Assert.assertTrue;
8+
import com.exasol.adapter.sql.ScalarFunction;
89

910
class ScalarFunctionCapabilityTest {
1011
@Test
@@ -17,7 +18,7 @@ void testCompleteness() {
1718
foundCap = true;
1819
}
1920
}
20-
assertTrue("Did not find a capability for function " + function.name(), foundCap);
21+
assertTrue(foundCap, "Did not find a capability for function " + function.name());
2122
}
2223
}
2324

@@ -27,5 +28,4 @@ void testConsistentNaming() {
2728
assertEquals(cap.name(), cap.getFunction().name());
2829
}
2930
}
30-
3131
}

0 commit comments

Comments
 (0)