Skip to content

Commit 545e204

Browse files
author
Arttu Voutilainen
committed
fix spark
1 parent 8e4ef88 commit 545e204

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

spark/src/main/scala/io/substrait/spark/expression/IgnoreNullableAndParameters.scala

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ class IgnoreNullableAndParameters(val typeToMatch: ParameterizedType)
5555
override def visit(`type`: Type.IntervalYear): Boolean =
5656
typeToMatch.isInstanceOf[Type.IntervalYear]
5757

58-
override def visit(`type`: Type.IntervalDay): Boolean = typeToMatch.isInstanceOf[Type.IntervalDay]
58+
override def visit(`type`: Type.IntervalDay): Boolean =
59+
typeToMatch.isInstanceOf[Type.IntervalDay] || typeToMatch.isInstanceOf[ParameterizedType.IntervalDay]
60+
61+
override def visit(`type`: Type.IntervalCompound): Boolean =
62+
typeToMatch.isInstanceOf[Type.IntervalCompound] || typeToMatch.isInstanceOf[ParameterizedType.IntervalCompound]
5963

6064
override def visit(`type`: Type.UUID): Boolean = typeToMatch.isInstanceOf[Type.UUID]
6165

@@ -103,6 +107,14 @@ class IgnoreNullableAndParameters(val typeToMatch: ParameterizedType)
103107
override def visit(expr: ParameterizedType.Decimal): Boolean =
104108
typeToMatch.isInstanceOf[Type.Decimal] || typeToMatch.isInstanceOf[ParameterizedType.Decimal]
105109

110+
@throws[RuntimeException]
111+
override def visit(expr: ParameterizedType.IntervalDay): Boolean =
112+
typeToMatch.isInstanceOf[Type.IntervalDay] || typeToMatch.isInstanceOf[ParameterizedType.IntervalDay]
113+
114+
@throws[RuntimeException]
115+
override def visit(expr: ParameterizedType.IntervalCompound): Boolean =
116+
typeToMatch.isInstanceOf[Type.IntervalCompound] || typeToMatch.isInstanceOf[ParameterizedType.IntervalCompound]
117+
106118
@throws[RuntimeException]
107119
override def visit(expr: ParameterizedType.Struct): Boolean =
108120
typeToMatch.isInstanceOf[Type.Struct] || typeToMatch.isInstanceOf[ParameterizedType.Struct]

0 commit comments

Comments
 (0)