RussellSpitzer commented on a change in pull request #2757:
URL: https://github.com/apache/iceberg/pull/2757#discussion_r661534486



##########
File path: spark/src/main/java/org/apache/iceberg/spark/SparkUtil.java
##########
@@ -20,21 +20,38 @@
 package org.apache.iceberg.spark;
 
 import java.util.List;
+import java.util.Map;
 import java.util.function.BiFunction;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 import org.apache.iceberg.PartitionField;
 import org.apache.iceberg.PartitionSpec;
+import org.apache.iceberg.Schema;
 import org.apache.iceberg.Table;
 import org.apache.iceberg.hadoop.HadoopFileIO;
 import org.apache.iceberg.io.FileIO;
 import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
 import org.apache.iceberg.transforms.Transform;
 import org.apache.iceberg.transforms.UnknownTransform;
+import org.apache.iceberg.types.TypeUtil;
+import org.apache.iceberg.types.Types;
 import org.apache.iceberg.util.Pair;
+import org.apache.spark.sql.RuntimeConfig;
 import org.apache.spark.util.SerializableConfiguration;
 
 public class SparkUtil {
+
+  public static final String 
HANDLE_TIMESTAMP_WITHOUT_TIMEZONE_SESSION_PROPERTY =
+          "spark.sql.iceberg.convert-timestamp-without-timezone";
+  public static final String TIMESTAMP_WITHOUT_TIMEZONE_ERROR = 
String.format("Cannot handle timestamp without" +
+          " timezone fields in Spark. Spark does not natively support this 
type but if you would like to handle all" +
+          " timestamps as timestamp with timezone set '%s' to true. This will 
not change the underlying values stored" +
+          " but will change their displayed values in Spark. For more 
information please see" +
+          " 
https://docs.databricks.com/spark/latest/dataframes-datasets/dates-timestamps.html#ansi-sql-and";
 +
+          "-spark-sql-timestamps", 
HANDLE_TIMESTAMP_WITHOUT_TIMEZONE_SESSION_PROPERTY);
+  public static final String READ_TIMESTAMP_AS_TIMESTAMP_WITHOUT_TIMEZONE =

Review comment:
       I'm not sure I follow based on the names, we have one property for 
reading and writing to existing tables, and you would like there to be an 
additional property for creating new tables which defaults the iceberg table to 
TS without Timezone?
   
   If so can we just make those names a little clearer? 




-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to