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

    https://github.com/apache/spark/pull/15538#discussion_r84157257
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFileFormat.scala
 ---
    @@ -718,7 +717,8 @@ object ParquetFileFormat extends Logging {
       }
     
       /**
    -   * ParquetFileFormat.prepareWrite calls this function to initialize 
`redirectParquetLogsViaSLF4J`.
    +   * The ParquetFileFormat constructor calls this function to initialize
    +   * `redirectParquetLogsViaSLF4J`.
        */
    -  def redirectParquetLogs(): Unit = {}
    +  private def redirectParquetLogs(): Unit = {}
    --- End diff --
    
    I don't believe Scala classes have static initializers. That would be great 
here.
    
    Moving this method call into the constructor ensures it's called no more 
times than it does if it's in a method.


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