You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2019/12/05 23:21:38 UTC

[GitHub] [incubator-iceberg] prodeezy commented on a change in pull request #690: Shading Arrow dependencies

prodeezy commented on a change in pull request #690: Shading Arrow dependencies 
URL: https://github.com/apache/incubator-iceberg/pull/690#discussion_r354598078
 
 

 ##########
 File path: arrow/src/main/scala/org/apache/iceberg/arrow/ArrowUtils.scala
 ##########
 @@ -0,0 +1,93 @@
+/*
+ * 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.iceberg.arrow
+
+import org.apache.arrow.memory.RootAllocator
+import org.apache.arrow.vector.types.{DateUnit, FloatingPointPrecision, TimeUnit}
+import org.apache.arrow.vector.types.pojo.{ArrowType, Field, FieldType, Schema}
+import org.apache.spark.sql.internal.SQLConf
+import org.apache.spark.sql.types.{ArrayType, BinaryType, BooleanType, ByteType,
+  DataType, DateType, DecimalType, DoubleType, FloatType, IntegerType, LongType,
+  ShortType, StringType, StructField, StructType, TimestampType}
+import scala.collection.JavaConverters._
+
+/**
+ * This code is copied from Apache Spark Project's SQL ArrowUtils to be able
+  * to shade the Arrow dependencies and keep Arrow code independent from Spark
+ */
+object ArrowUtils {
 
 Review comment:
   This i copied from Spark SQL code as these utility methods are used in iceberg-parquet module. This is needed for shading because there is a dependency on arrow-memory jar from this code and shading that jar fails this part of the code since the spark sql jars cannot be included and shaded in the runtime fat jar. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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