Skip to content

Commit 451901a

Browse files
fix: Fixes types comparison (#353)
1 parent 2739f69 commit 451901a

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
<groupId>org.scala-lang</groupId>
112112
<artifactId>scala-library</artifactId>
113113
<version>${scala.version}</version>
114-
<scope>provided</scope>
115114
</dependency>
116115
<dependency>
117116
<groupId>org.scala-lang.modules</groupId>

src/main/java/com/google/cloud/pubsublite/spark/PslSparkUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public static void verifyWriteInputSchema(StructType inputSchema) {
176176
Option<Object> idxOr = inputSchema.getFieldIndex(k);
177177
if (!idxOr.isEmpty()) {
178178
StructField f = inputSchema.apply((int) idxOr.get());
179-
if (f.dataType() != v) {
179+
if (!f.dataType().sameType(v)) {
180180
throw new IllegalArgumentException(
181181
String.format(
182182
"Column %s in input schema to write to "

0 commit comments

Comments
 (0)