Skip to content

Commit 56819cc

Browse files
author
Paultagoras
committed
Expanding a metadata test
1 parent 9406ded commit 56819cc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

jdbc-v2/src/test/java/com/clickhouse/jdbc/metadata/DatabaseMetaDataTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ public void testGetColumns() throws Exception {
3737
conn.createStatement().execute("DROP TABLE IF EXISTS " + tableName);
3838

3939
StringBuilder createTableStmt = new StringBuilder("CREATE TABLE " + tableName + " (");
40-
List<String> columnNames = Arrays.asList("id", "name", "float1", "fixed_string1", "decimal_1", "nullable_column");
41-
List<String> columnTypes = Arrays.asList("UInt64", "String", "Float32", "FixedString(10)", "Decimal(10, 2)", "Nullable(Decimal(5, 4))");
42-
List<Integer> columnSizes = Arrays.asList(8, 0, 4, 10, 10, 5);
43-
List<Integer> columnJDBCDataTypes = Arrays.asList(Types.BIGINT, Types.VARCHAR, Types.FLOAT, Types.CHAR, Types.DECIMAL, Types.DECIMAL);
44-
List<String> columnTypeNames = Arrays.asList("UInt64", "String", "Float32", "FixedString(10)", "Decimal(10, 2)", "Nullable(Decimal(5, 4))");
45-
List<Boolean> columnNullable = Arrays.asList(false, false, false, false, false, true);
46-
List<Integer> columnDecimalDigits = Arrays.asList(null, null, null, null, 2, 4);
47-
List<Integer> columnRadix = Arrays.asList(2, null, null, null, 10, 10);
40+
List<String> columnNames = Arrays.asList("id", "name", "float1", "fixed_string1", "decimal_1", "nullable_column", "date", "datetime");
41+
List<String> columnTypes = Arrays.asList("UInt64", "String", "Float32", "FixedString(10)", "Decimal(10, 2)", "Nullable(Decimal(5, 4))", "Date", "DateTime");
42+
List<Integer> columnSizes = Arrays.asList(8, 0, 4, 10, 10, 5, 2, 0);
43+
List<Integer> columnJDBCDataTypes = Arrays.asList(Types.BIGINT, Types.VARCHAR, Types.FLOAT, Types.CHAR, Types.DECIMAL, Types.DECIMAL, Types.DATE, Types.TIMESTAMP_WITH_TIMEZONE);
44+
List<String> columnTypeNames = Arrays.asList("UInt64", "String", "Float32", "FixedString(10)", "Decimal(10, 2)", "Nullable(Decimal(5, 4))", "Date", "DateTime");
45+
List<Boolean> columnNullable = Arrays.asList(false, false, false, false, false, true, false, false);
46+
List<Integer> columnDecimalDigits = Arrays.asList(null, null, null, null, 2, 4, null, null);
47+
List<Integer> columnRadix = Arrays.asList(2, null, null, null, 10, 10, null, null);
4848

4949
for (int i = 0; i < columnNames.size(); i++) {
5050
createTableStmt.append(columnNames.get(i)).append(" ").append(columnTypes.get(i)).append(',');

0 commit comments

Comments
 (0)