huaxingao commented on a change in pull request #34497:
URL: https://github.com/apache/spark/pull/34497#discussion_r749759617



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/connector/SupportsCatalogOptionsSuite.scala
##########
@@ -271,6 +275,47 @@ class SupportsCatalogOptionsSuite extends QueryTest with 
SharedSparkSession with
     }
   }
 
+  test("mock time travel test") {
+    sql(s"create table $catalogName.t123456789 (id bigint) using $format")
+    sql(s"create table $catalogName.t234567891 (id bigint) using $format")

Review comment:
       I think we need to have a valid timestamp when specifying the time stamp 
as of value, otherwise, we will get Exception
   ```
   Cannot cast 123456 to TimestampType.
   java.time.DateTimeException: Cannot cast 123456 to TimestampType.
        at 
org.apache.spark.sql.errors.QueryExecutionErrors$.cannotCastUTF8StringToDataTypeError(QueryExecutionErrors.scala:963)
        at 
org.apache.spark.sql.catalyst.util.DateTimeUtils$.$anonfun$stringToTimestampAnsi$1(DateTimeUtils.scala:431)
        at scala.Option.getOrElse(Option.scala:189)
        at 
org.apache.spark.sql.catalyst.util.DateTimeUtils$.stringToTimestampAnsi(DateTimeUtils.scala:431)
        at 
org.apache.spark.sql.connector.expressions.TimeTravelSpec$.create(expressions.scala:378)
   ```




-- 
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.

To unsubscribe, e-mail: [email protected]

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