Skip to content

Commit 86c26d3

Browse files
authored
Add time related types (#2468)
1 parent 029ad09 commit 86c26d3

File tree

193 files changed

+10740
-1818
lines changed

Some content is hidden

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

193 files changed

+10740
-1818
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
@@ -21,4 +21,9 @@ protected Map<String, String> getCreationOptions() {
2121
protected AdminTestUtils getAdminTestUtils(String testName) {
2222
return new CassandraAdminTestUtils(getProperties(testName));
2323
}
24+
25+
@Override
26+
protected boolean isTimestampTypeSupported() {
27+
return false;
28+
}
2429
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,9 @@ protected void initialize(String testName) {
2828
admin = new CassandraAdmin(clusterManager, new DatabaseConfig(properties));
2929
adminTestUtils = new CassandraAdminTestUtils(properties, clusterManager);
3030
}
31+
32+
@Override
33+
protected boolean isTimestampTypeSupported() {
34+
return false;
35+
}
3136
}

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
@@ -16,4 +16,9 @@ protected Properties getProperties(String testName) {
1616
protected Map<String, String> getCreationOptions() {
1717
return Collections.singletonMap(CassandraAdmin.REPLICATION_FACTOR, "1");
1818
}
19+
20+
@Override
21+
protected boolean isTimestampTypeSupported() {
22+
return false;
23+
}
1924
}

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
@@ -32,4 +32,9 @@ protected boolean shouldMutate(
3232
return super.shouldMutate(initialColumn, columnToCompare, operator);
3333
}
3434
}
35+
36+
@Override
37+
protected boolean isTimestampTypeSupported() {
38+
return false;
39+
}
3540
}

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,9 +1,12 @@
11
package com.scalar.db.storage.cassandra;
22

33
import com.scalar.db.api.DistributedStorageMultipleClusteringKeyScanIntegrationTestBase;
4+
import com.scalar.db.io.DataType;
45
import java.util.Collections;
6+
import java.util.List;
57
import java.util.Map;
68
import java.util.Properties;
9+
import java.util.stream.Collectors;
710

811
public class CassandraMultipleClusteringKeyScanIntegrationTest
912
extends DistributedStorageMultipleClusteringKeyScanIntegrationTestBase {
@@ -17,4 +20,11 @@ protected Properties getProperties(String testName) {
1720
protected Map<String, String> getCreationOptions() {
1821
return Collections.singletonMap(CassandraAdmin.REPLICATION_FACTOR, "1");
1922
}
23+
24+
@Override
25+
protected List<DataType> getDataTypes() {
26+
return super.getDataTypes().stream()
27+
.filter(type -> type != DataType.TIMESTAMP)
28+
.collect(Collectors.toList());
29+
}
2030
}

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

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

33
import com.scalar.db.api.DistributedStorageMultiplePartitionKeyIntegrationTestBase;
4+
import com.scalar.db.io.DataType;
45
import java.util.Collections;
6+
import java.util.List;
57
import java.util.Map;
68
import java.util.Properties;
9+
import java.util.stream.Collectors;
710

811
public class CassandraMultiplePartitionKeyIntegrationTest
912
extends DistributedStorageMultiplePartitionKeyIntegrationTestBase {
@@ -16,4 +19,11 @@ protected Properties getProperties(String testName) {
1619
protected Map<String, String> getCreationOptions() {
1720
return Collections.singletonMap(CassandraAdmin.REPLICATION_FACTOR, "1");
1821
}
22+
23+
@Override
24+
protected List<DataType> getDataTypes() {
25+
return super.getDataTypes().stream()
26+
.filter(type -> type != DataType.TIMESTAMP)
27+
.collect(Collectors.toList());
28+
}
1929
}

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
@@ -54,4 +54,9 @@ protected List<String> getCommandArgsForUpgrade(Path configFilePath) {
5454
.add("--replication-factor=1")
5555
.build();
5656
}
57+
58+
@Override
59+
protected boolean isTimestampTypeSupported() {
60+
return false;
61+
}
5762
}

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
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.Collections;
56
import java.util.Map;
67
import java.util.Properties;
8+
import java.util.Set;
9+
import java.util.stream.Collectors;
710

811
public class CassandraSecondaryIndexIntegrationTest
912
extends DistributedStorageSecondaryIndexIntegrationTestBase {
@@ -16,4 +19,11 @@ protected Properties getProperties(String testName) {
1619
protected Map<String, String> getCreationOptions() {
1720
return Collections.singletonMap(CassandraAdmin.REPLICATION_FACTOR, "1");
1821
}
22+
23+
@Override
24+
protected Set<DataType> getSecondaryIndexTypes() {
25+
return super.getSecondaryIndexTypes().stream()
26+
.filter(type -> type != DataType.TIMESTAMP)
27+
.collect(Collectors.toSet());
28+
}
1929
}

0 commit comments

Comments
 (0)