Github user liancheng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8988#discussion_r41465749
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilters.scala
 ---
    @@ -282,33 +277,4 @@ private[sql] object ParquetFilters {
         addMethod.setAccessible(true)
         addMethod.invoke(null, classOf[Binary], enumTypeDescriptor)
       }
    -
    -  /**
    -   * Note: Inside the Hadoop API we only have access to `Configuration`, 
not to
    -   * [[org.apache.spark.SparkContext]], so we cannot use broadcasts to 
convey
    -   * the actual filter predicate.
    -   */
    -  def serializeFilterExpressions(filters: Seq[Expression], conf: 
Configuration): Unit = {
    -    if (filters.nonEmpty) {
    -      val serialized: Array[Byte] =
    -        
SparkEnv.get.closureSerializer.newInstance().serialize(filters).array()
    -      val encoded: String = BaseEncoding.base64().encode(serialized)
    -      conf.set(PARQUET_FILTER_DATA, encoded)
    -    }
    -  }
    -
    -  /**
    -   * Note: Inside the Hadoop API we only have access to `Configuration`, 
not to
    -   * [[org.apache.spark.SparkContext]], so we cannot use broadcasts to 
convey
    -   * the actual filter predicate.
    -   */
    -  def deserializeFilterExpressions(conf: Configuration): Seq[Expression] = 
{
    -    val data = conf.get(PARQUET_FILTER_DATA)
    -    if (data != null) {
    -      val decoded: Array[Byte] = BaseEncoding.base64().decode(data)
    -      
SparkEnv.get.closureSerializer.newInstance().deserialize(ByteBuffer.wrap(decoded))
    -    } else {
    -      Seq()
    -    }
    -  }
    --- End diff --
    
    This part of code is irrelevant to this PR, but it has been dead for a 
while, so remove it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to