Skip to content

Commit f58ba3d

Browse files
authored
Merge pull request #64 from datastax/feature/cant-migrate-time-type
Added support for 'time' & 'smallint' data type
2 parents eee9a3f + 900973c commit f58ba3d

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>datastax.astra.migrate</groupId>
55
<artifactId>cassandra-data-migrator</artifactId>
6-
<version>3.0.3</version>
6+
<version>3.0.4</version>
77
<packaging>jar</packaging>
88

99
<properties>

src/main/java/datastax/astra/migrate/MigrateDataType.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.nio.ByteBuffer;
99
import java.time.Instant;
1010
import java.time.LocalDate;
11+
import java.time.LocalTime;
1112
import java.util.*;
1213

1314
public class MigrateDataType {
@@ -81,6 +82,10 @@ private Class getType(int type) {
8182
return UdtValue.class;
8283
case 17:
8384
return BigInteger.class;
85+
case 18:
86+
return LocalTime.class;
87+
case 19:
88+
return Short.class;
8489
}
8590

8691
return Object.class;

src/resources/sparkConf.properties

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ spark.query.writetime.cols 2,3
8989
#############################################################################################################
9090
# Following are the supported data types and their corresponding [Cassandra data-types]
9191
# 0: ascii, text, varchar
92-
# 1: int, smallint
92+
# 1: int
9393
# 2: bigint, counter
9494
# 3: double
95-
# 4: time, timestamp
95+
# 4: timestamp
9696
# 5: map (separate type by %) - Example: 5%1%0 for map<int, text>
9797
# 6: list (separate type by %) - Example: 6%0 for list<text>
9898
# 7: blob
@@ -106,6 +106,8 @@ spark.query.writetime.cols 2,3
106106
# 15: date
107107
# 16: UDT [any user-defined-type created using 'CREATE TYPE']
108108
# 17: varint
109+
# 18: time
110+
# 19: smallint
109111

110112
# Note: Ignore "Frozen" while mapping Collections (Map/List/Set) - Example: 5%1%0 for frozen<map<int, text>>
111113
#

0 commit comments

Comments
 (0)