Skip to content

Commit 1deedf2

Browse files
committed
Made a few comments and a few corrections
1 parent 2042e6b commit 1deedf2

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

jdbc-v2/src/main/java/com/clickhouse/jdbc/metadata/DatabaseMetaDataImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,12 +312,12 @@ public boolean supportsTableCorrelationNames() throws SQLException {
312312

313313
@Override
314314
public boolean supportsDifferentTableCorrelationNames() throws SQLException {
315-
return true; // no support
315+
return false; // can be the same as table name `select * from numbers numbers limit 10`
316316
}
317317

318318
@Override
319319
public boolean supportsExpressionsInOrderBy() throws SQLException {
320-
return false;
320+
return true;
321321
}
322322

323323
@Override
@@ -687,7 +687,7 @@ public boolean supportsTransactions() throws SQLException {
687687

688688
@Override
689689
public boolean supportsTransactionIsolationLevel(int level) throws SQLException {
690-
return ConnectionImpl.TRANSACTION_NONE == level; // no transaction support
690+
return Connection.TRANSACTION_NONE == level; // no transaction support
691691
}
692692

693693
@Override

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@
1010
import org.testng.Assert;
1111
import org.testng.annotations.Test;
1212

13-
import java.lang.reflect.Method;
1413
import java.sql.Connection;
1514
import java.sql.DatabaseMetaData;
1615
import java.sql.ResultSet;
1716
import java.sql.ResultSetMetaData;
1817
import java.sql.SQLException;
1918
import java.sql.Statement;
2019
import java.sql.Types;
21-
import java.util.ArrayList;
2220
import java.util.Arrays;
2321
import java.util.Collections;
2422
import java.util.List;
@@ -172,8 +170,8 @@ public void testSupportFlags() throws Exception {
172170
assertEquals(dbmd.supportsColumnAliasing(), true);
173171
assertEquals(dbmd.supportsConvert(), false);
174172
assertEquals(dbmd.supportsTableCorrelationNames(), true);
175-
assertEquals(dbmd.supportsDifferentTableCorrelationNames(), true);
176-
assertEquals(dbmd.supportsExpressionsInOrderBy(), false);
173+
assertEquals(dbmd.supportsDifferentTableCorrelationNames(), false);
174+
assertEquals(dbmd.supportsExpressionsInOrderBy(), true);
177175
assertEquals(dbmd.supportsOrderByUnrelated(), true);
178176
assertEquals(dbmd.supportsGroupBy(), true);
179177
assertEquals(dbmd.supportsGroupByUnrelated(), true);
@@ -285,7 +283,6 @@ public void testSupportFlags() throws Exception {
285283
assertEquals(dbmd.supportsResultSetType(ResultSet.TYPE_FORWARD_ONLY), true);
286284

287285
for (int type : new int[] {ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.TYPE_SCROLL_SENSITIVE} ) {
288-
assertFalse(dbmd.supportsResultSetType(type));
289286
assertFalse(dbmd.supportsResultSetType(type));
290287
assertFalse(dbmd.ownUpdatesAreVisible(type));
291288
assertFalse(dbmd.ownDeletesAreVisible(type));

0 commit comments

Comments
 (0)