diff --git a/launch/vsc-jdbc all test.launch b/launch/vsc-jdbc all test.launch
index 7ed8fef..6bb3bf1 100644
--- a/launch/vsc-jdbc all test.launch
+++ b/launch/vsc-jdbc all test.launch
@@ -1,27 +1,27 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pom.xml b/pom.xml
index e4d926e..5738cd2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
Common module for JDBC-based data access from Virtual Schemas.
https://github.com/exasol/virtual-schema-common-jdbc
- 3.0.0
+ 3.0.1
UTF-8
UTF-8
11
diff --git a/src/test/java/com/exasol/adapter/jdbc/BaseColumnMetadataReaderTest.java b/src/test/java/com/exasol/adapter/jdbc/BaseColumnMetadataReaderTest.java
index e62f7bb..7f1fbc9 100644
--- a/src/test/java/com/exasol/adapter/jdbc/BaseColumnMetadataReaderTest.java
+++ b/src/test/java/com/exasol/adapter/jdbc/BaseColumnMetadataReaderTest.java
@@ -1,8 +1,8 @@
package com.exasol.adapter.jdbc;
+import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsInAnyOrder;
-import static org.hamcrest.Matchers.equalTo;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -20,6 +20,7 @@
import com.exasol.adapter.dialects.IdentifierCaseHandling;
import com.exasol.adapter.metadata.ColumnMetadata;
import com.exasol.adapter.metadata.DataType;
+import com.exasol.adapter.metadata.DataType.ExaCharset;
import com.exasol.adapter.metadata.DataType.ExaDataType;
class BaseColumnMetadataReaderTest {
@@ -72,4 +73,19 @@ void testMapJdbcTypeNumericToDecimalWithFallbackToDoubleReturnsDecimal() {
assertThat(this.reader.mapJdbcTypeNumericToDecimalWithFallbackToDouble(jdbcTypeDescription),
equalTo(DataType.createDecimal(DataType.MAX_EXASOL_DECIMAL_PRECISION, 10)));
}
+
+ @ValueSource(ints = { 256, 65536, 2000000 }) // 2 pow 8, 2 pow 16, max
+ @ParameterizedTest
+ void mapLongVarchar(final int size) {
+ final JdbcTypeDescription typeDescription = new JdbcTypeDescription(Types.LONGVARCHAR, 0, size, 0, "VARCHAR");
+ assertThat(this.reader.mapJdbcType(typeDescription), equalTo(DataType.createVarChar(size, ExaCharset.UTF8)));
+ }
+
+ @ValueSource(ints = { 2000001, 16777216 }) // max + 1, 2 pow 24
+ @ParameterizedTest
+ void mapLongVarcharToUnsupportedIfTooLarge(final int size) {
+ final JdbcTypeDescription typeDescription = new JdbcTypeDescription(Types.LONGVARCHAR, 0, size, 0, "VARCHAR");
+ assertThat(this.reader.mapJdbcType(typeDescription),
+ equalTo(DataType.createMaximumSizeVarChar(ExaCharset.UTF8)));
+ }
}
\ No newline at end of file