rdblue commented on a change in pull request #139: ORC support integration for Spark 2.4.0 URL: https://github.com/apache/incubator-iceberg/pull/139#discussion_r271096547
########## File path: spark/src/test/java/org/apache/iceberg/spark/source/TestOrcScan.java ########## @@ -0,0 +1,126 @@ +/* + * Copyright 2018 Hortonworks + * + * Licensed 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.spark.source; + +import org.apache.iceberg.DataFile; +import org.apache.iceberg.DataFiles; +import org.apache.iceberg.FileFormat; +import org.apache.iceberg.Metrics; +import org.apache.iceberg.PartitionSpec; +import org.apache.iceberg.Schema; +import org.apache.iceberg.Table; +import org.apache.iceberg.hadoop.HadoopTables; +import org.apache.iceberg.orc.ORC; +import org.apache.iceberg.spark.data.AvroDataTest; +import org.apache.iceberg.spark.data.RandomData; +import org.apache.iceberg.spark.data.SparkOrcWriter; +import org.apache.iceberg.spark.data.TestHelpers; +import org.apache.hadoop.conf.Configuration; +import org.apache.spark.sql.Dataset; +import org.apache.spark.sql.Row; +import org.apache.spark.sql.SparkSession; +import org.apache.spark.sql.catalyst.InternalRow; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Rule; +import org.junit.rules.TemporaryFolder; + +import java.io.File; +import java.io.IOException; +import java.util.Iterator; +import java.util.List; +import java.util.UUID; + +import static org.apache.iceberg.Files.localOutput; + +public class TestOrcScan extends AvroDataTest { Review comment: The problem with these tests is that they require supporting ORC in the Spark reader and writer. I don't think we should update the Spark reader and writer until many of the problems with ORC support are fixed. For example, ORC doesn't actually use the `InputFile` and `OutputFile` abstractions, it creates paths from the locations and relies on Hadoop. It also doesn't support the full suite of features required for Iceberg formats, including column reordering. What I'd prefer is to write tests like TestSparkParquetReader and TestSparkParquetWriter that don't go through the Spark reader and writer, but test the Spark data model directly. That way, we can remove the changes that actually expose the format until it has full support. Otherwise, we'll just have to remove it and disable the tests for the release. ---------------------------------------------------------------- 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]
