cchighman commented on a change in pull request #28841: URL: https://github.com/apache/spark/pull/28841#discussion_r468636352
########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/pathfilters/ModifiedAfterFilter.scala ########## @@ -0,0 +1,59 @@ +/* + * 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.spark.sql.execution.datasources.pathfilters + +import org.apache.hadoop.conf.Configuration +import org.apache.hadoop.fs._ + +import org.apache.spark.sql.SparkSession +import org.apache.spark.sql.catalyst.util.{CaseInsensitiveMap, DateTimeUtils} + +/** + * [SPARK-31962] + * Filter used to determine whether file was modified + * after the provided timestamp. + * + * @param sparkSession SparkSession + * @param hadoopConf Hadoop Configuration object + * @param options Map containing options + */ +case class ModifiedAfterFilter(sparkSession: SparkSession, + hadoopConf: Configuration, + options: CaseInsensitiveMap[String]) + extends ModifiedDateFilter(sparkSession, hadoopConf, options) Review comment: All instances where these class defs were off has been addressed. ########## File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala ########## @@ -467,6 +467,14 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging { * <li>`pathGlobFilter`: an optional glob pattern to only include files with paths matching * the pattern. The syntax follows <code>org.apache.hadoop.fs.GlobFilter</code>. * It does not change the behavior of partition discovery.</li> + * <li>`modifiedBefore`: an optional timestamp to only include files with + * modification times occurring before the specified time. The provided timestamp + * must be in the following form: <code>YYYY-MM-DDTHH:mm:ss</code> Example: + * <code>2020-06-01T13:00:00</code> + * <li>`modifiedAfter`: an optional timestamp to only include files with + * modification times occurring after the specified time. The provided timestamp Review comment: This has been created in readwriter.py and also this file as well. ---------------------------------------------------------------- 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]
