MaxGekk commented on a change in pull request #27915: [SPARK-31159][SQL] Rebase 
date/timestamp from/to Julian calendar in parquet
URL: https://github.com/apache/spark/pull/27915#discussion_r393884160
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
 ##########
 @@ -3072,6 +3086,8 @@ class SQLConf extends Serializable with Logging {
 
   def integerGroupingIdEnabled: Boolean = 
getConf(SQLConf.LEGACY_INTEGER_GROUPING_ID)
 
+  def parquetRebaseDateTimeEnabled: Boolean = 
getConf(SQLConf.LEGACY_PARQUET_REBASE_DATETIME)
 
 Review comment:
   I need to read the config in Java. The obvious replacement doesn't work:
   ```java
   this.rebaseDateTime = 
SQLConf.get().getConf(SQLConf.LEGACY_PARQUET_REBASE_DATETIME());
   ```
   ```
   Error:(134, 48) java: incompatible types: inference variable T has 
incompatible bounds
       equality constraints: java.lang.Object
       upper bounds: java.lang.Boolean,java.lang.Object
   ```
   If you have strong opinion about removing the method `def 
parquetRebaseDateTimeEnabled`, could you show me how to read a SQL config in 
Java. I haven't found any example, unfortunately:
   ```
   $ find . -name "*.java" -print0|xargs -0 grep 'SQLConf.get'
   
./sql/core/src/test/java/test/org/apache/spark/sql/JavaBeanDeserializationSuite.java:
      DateTimeUtils.getZoneId(SQLConf.get().sessionLocalTimeZone()));
   
./sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedColumnReader.java:
    this.rebaseDateTime = SQLConf.get().parquetRebaseDateTimeEnabled();
   ```

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


With regards,
Apache Git Services

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

Reply via email to