Skip to content

Commit

Permalink
fix: Fixes types comparison (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangmichaellll committed Jan 27, 2022
1 parent 2739f69 commit 451901a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.scala-lang.modules</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public static void verifyWriteInputSchema(StructType inputSchema) {
Option<Object> idxOr = inputSchema.getFieldIndex(k);
if (!idxOr.isEmpty()) {
StructField f = inputSchema.apply((int) idxOr.get());
if (f.dataType() != v) {
if (!f.dataType().sameType(v)) {
throw new IllegalArgumentException(
String.format(
"Column %s in input schema to write to "
Expand Down

0 comments on commit 451901a

Please sign in to comment.