Skip to content

Commit b082256

Browse files
committed
Add time related types (#2468)
# Conflicts: # core/src/integration-test/java/com/scalar/db/storage/cassandra/CassandraAdminRepairIntegrationTest.java # core/src/integration-test/java/com/scalar/db/storage/cassandra/CassandraColumnValueIntegrationTest.java # core/src/integration-test/java/com/scalar/db/storage/cassandra/CassandraMultipleClusteringKeyScanIntegrationTest.java # core/src/integration-test/java/com/scalar/db/storage/cassandra/CassandraMultiplePartitionKeyIntegrationTest.java # core/src/integration-test/java/com/scalar/db/storage/cassandra/CassandraSchemaLoaderIntegrationTest.java # core/src/integration-test/java/com/scalar/db/storage/cassandra/CassandraSecondaryIndexIntegrationTest.java # core/src/integration-test/java/com/scalar/db/storage/cassandra/CassandraSingleClusteringKeyScanIntegrationTest.java # core/src/integration-test/java/com/scalar/db/storage/cassandra/CassandraSinglePartitionKeyIntegrationTest.java # core/src/integration-test/java/com/scalar/db/storage/cassandra/ConsensusCommitAdminIntegrationTestWithCassandra.java # core/src/integration-test/java/com/scalar/db/storage/cassandra/ConsensusCommitAdminRepairIntegrationTestWithCassandra.java # core/src/integration-test/java/com/scalar/db/storage/cassandra/ConsensusCommitIntegrationTestWithCassandra.java # core/src/integration-test/java/com/scalar/db/storage/cassandra/SingleCrudOperationTransactionAdminIntegrationTestWithCassandra.java # core/src/integration-test/java/com/scalar/db/storage/cassandra/TwoPhaseConsensusCommitIntegrationTestWithCassandra.java # core/src/integration-test/java/com/scalar/db/storage/jdbc/JdbcAdminImportTestUtils.java # core/src/main/java/com/scalar/db/common/CheckedDistributedStorageAdmin.java # core/src/main/java/com/scalar/db/storage/cassandra/CassandraAdmin.java # core/src/main/java/com/scalar/db/storage/jdbc/JdbcAdmin.java # core/src/main/java/com/scalar/db/storage/jdbc/JdbcConfig.java # core/src/main/java/com/scalar/db/storage/jdbc/RdbEngineOracle.java # core/src/main/java/com/scalar/db/storage/jdbc/RdbEnginePostgresql.java # core/src/main/java/com/scalar/db/storage/jdbc/RdbEngineSqlServer.java # core/src/main/java/com/scalar/db/storage/jdbc/RdbEngineSqlite.java # core/src/main/java/com/scalar/db/transaction/consensuscommit/ConsensusCommitAdmin.java # core/src/test/java/com/scalar/db/storage/cosmos/CosmosAdminTestBase.java # core/src/test/java/com/scalar/db/storage/jdbc/JdbcAdminTestBase.java # core/src/test/java/com/scalar/db/storage/multistorage/MultiStorageAdminTest.java # integration-test/src/main/java/com/scalar/db/api/DistributedStorageAdminImportTableIntegrationTestBase.java # integration-test/src/main/java/com/scalar/db/api/DistributedStorageAdminRepairTableIntegrationTestBase.java # integration-test/src/main/java/com/scalar/db/api/DistributedTransactionAdminImportTableIntegrationTestBase.java # integration-test/src/main/java/com/scalar/db/api/DistributedTransactionAdminRepairIntegrationTestBase.java # integration-test/src/main/java/com/scalar/db/schemaloader/SchemaLoaderIntegrationTestBase.java
1 parent db432f3 commit b082256

File tree

194 files changed

+10751
-1809
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+10751
-1809
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ subprojects {
3131
commonsDbcp2Version = '2.13.0'
3232
mysqlDriverVersion = '8.4.0'
3333
postgresqlDriverVersion = '42.7.5'
34-
oracleDriverVersion = '21.16.0.0'
35-
sqlserverDriverVersion = '11.2.3.jre8'
34+
oracleDriverVersion = '23.6.0.24.10'
35+
sqlserverDriverVersion = '12.8.1.jre8'
3636
sqliteDriverVersion = '3.48.0.0'
3737
yugabyteDriverVersion = '42.7.3-yb-2'
3838
mariadDbDriverVersion = '3.5.1'

core/src/integration-test/java/com/scalar/db/storage/cassandra/CassandraAdminIntegrationTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,9 @@ protected String getSystemNamespaceName(Properties properties) {
1616
.getSystemNamespaceName()
1717
.orElse(DatabaseConfig.DEFAULT_SYSTEM_NAMESPACE_NAME);
1818
}
19+
20+
@Override
21+
protected boolean isTimestampTypeSupported() {
22+
return false;
23+
}
1924
}

core/src/integration-test/java/com/scalar/db/storage/cassandra/CassandraAdminRepairTableIntegrationTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ public void repairTable_ShouldDoNothing() throws ExecutionException {
4343
// Act
4444
assertThatCode(
4545
() ->
46-
admin.repairTable(getNamespace(), getTable(), TABLE_METADATA, getCreationOptions()))
46+
admin.repairTable(
47+
getNamespace(), getTable(), getTableMetadata(), getCreationOptions()))
4748
.doesNotThrowAnyException();
4849

4950
// Assert
5051
assertThat(admin.tableExists(getNamespace(), getTable())).isTrue();
51-
assertThat(admin.getTableMetadata(getNamespace(), getTable())).isEqualTo(TABLE_METADATA);
52+
assertThat(admin.getTableMetadata(getNamespace(), getTable())).isEqualTo(getTableMetadata());
5253
}
5354
}

core/src/integration-test/java/com/scalar/db/storage/cassandra/CassandraColumnValueIntegrationTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,9 @@ public class CassandraColumnValueIntegrationTest
99
protected Properties getProperties(String testName) {
1010
return CassandraEnv.getProperties(testName);
1111
}
12+
13+
@Override
14+
protected boolean isTimestampTypeSupported() {
15+
return false;
16+
}
1217
}

core/src/integration-test/java/com/scalar/db/storage/cassandra/CassandraConditionalMutationIntegrationTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,9 @@ protected boolean shouldMutate(
2525
return super.shouldMutate(initialColumn, columnToCompare, operator);
2626
}
2727
}
28+
29+
@Override
30+
protected boolean isTimestampTypeSupported() {
31+
return false;
32+
}
2833
}

core/src/integration-test/java/com/scalar/db/storage/cassandra/CassandraCrossPartitionScanIntegrationTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,9 @@ protected Map<String, String> getCreationOptions() {
2424
@Override
2525
@Disabled("Cross partition scan with ordering is not supported in Cassandra")
2626
public void scan_WithOrderingForNonPrimaryColumns_ShouldReturnProperResult() {}
27+
28+
@Override
29+
protected boolean isTimestampTypeSupported() {
30+
return false;
31+
}
2732
}

core/src/integration-test/java/com/scalar/db/storage/cassandra/CassandraMultipleClusteringKeyScanIntegrationTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
package com.scalar.db.storage.cassandra;
22

33
import com.scalar.db.api.DistributedStorageMultipleClusteringKeyScanIntegrationTestBase;
4+
import com.scalar.db.io.DataType;
5+
import java.util.List;
46
import java.util.Properties;
7+
import java.util.stream.Collectors;
58

69
public class CassandraMultipleClusteringKeyScanIntegrationTest
710
extends DistributedStorageMultipleClusteringKeyScanIntegrationTestBase {
@@ -10,4 +13,11 @@ public class CassandraMultipleClusteringKeyScanIntegrationTest
1013
protected Properties getProperties(String testName) {
1114
return CassandraEnv.getProperties(testName);
1215
}
16+
17+
@Override
18+
protected List<DataType> getDataTypes() {
19+
return super.getDataTypes().stream()
20+
.filter(type -> type != DataType.TIMESTAMP)
21+
.collect(Collectors.toList());
22+
}
1323
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
package com.scalar.db.storage.cassandra;
22

33
import com.scalar.db.api.DistributedStorageMultiplePartitionKeyIntegrationTestBase;
4+
import com.scalar.db.io.DataType;
5+
import java.util.List;
46
import java.util.Properties;
7+
import java.util.stream.Collectors;
58

69
public class CassandraMultiplePartitionKeyIntegrationTest
710
extends DistributedStorageMultiplePartitionKeyIntegrationTestBase {
811
@Override
912
protected Properties getProperties(String testName) {
1013
return CassandraEnv.getProperties(testName);
1114
}
15+
16+
@Override
17+
protected List<DataType> getDataTypes() {
18+
return super.getDataTypes().stream()
19+
.filter(type -> type != DataType.TIMESTAMP)
20+
.collect(Collectors.toList());
21+
}
1222
}

core/src/integration-test/java/com/scalar/db/storage/cassandra/CassandraSchemaLoaderIntegrationTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@ protected Properties getProperties(String testName) {
1515
protected AdminTestUtils getAdminTestUtils(String testName) {
1616
return new CassandraAdminTestUtils(getProperties(testName));
1717
}
18+
19+
@Override
20+
protected boolean isTimestampTypeSupported() {
21+
return false;
22+
}
1823
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
package com.scalar.db.storage.cassandra;
22

33
import com.scalar.db.api.DistributedStorageSecondaryIndexIntegrationTestBase;
4+
import com.scalar.db.io.DataType;
45
import java.util.Properties;
6+
import java.util.Set;
7+
import java.util.stream.Collectors;
58

69
public class CassandraSecondaryIndexIntegrationTest
710
extends DistributedStorageSecondaryIndexIntegrationTestBase {
811
@Override
912
protected Properties getProperties(String testName) {
1013
return CassandraEnv.getProperties(testName);
1114
}
15+
16+
@Override
17+
protected Set<DataType> getSecondaryIndexTypes() {
18+
return super.getSecondaryIndexTypes().stream()
19+
.filter(type -> type != DataType.TIMESTAMP)
20+
.collect(Collectors.toSet());
21+
}
1222
}

0 commit comments

Comments
 (0)