RussellSpitzer commented on a change in pull request #2543:
URL: https://github.com/apache/iceberg/pull/2543#discussion_r624617463



##########
File path: spark3/src/test/java/org/apache/iceberg/spark/TestSparkFilters.java
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iceberg.spark;
+
+import java.sql.Date;
+import java.sql.Timestamp;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.temporal.ChronoUnit;
+import org.apache.iceberg.expressions.Expression;
+import org.apache.iceberg.expressions.Expressions;
+import org.apache.spark.sql.sources.GreaterThan;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestSparkFilters {

Review comment:
       As I noted in the Issue #2530 , for some reason Spark is only parsing 
these types as instant in 3.1.1 Spark-Sql Shell. But you can always 
programmatically pass them through as well.
   
   > The user reported the exception I noted at the top of this issue, I 
attempt to reproduce and cannot. I then find the following matrix of behaviors.
   > 
   > Spark 3.0.2 - spark-shell - No Issue
   > Spark 3.0.2 - spark-sql - No issue
   > Spark 3.1.1 - spark-shell - No issue
   > Spark 3.1.1 - spark-sql - Exception - Query Fails - not Literal From 
Instant
   
   I didn't try to find out why Spark 3.1.1 was parsing these (but only in 
spark-sql shell) as instants, I figured we might as well just support it since 
it now is a possibility in 3.0
   
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to