You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/02/17 05:45:59 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #31560: [SPARK-34432][SQL][TESTS] Add a java implementation of simple writable data source in DataSourceV2Suite

dongjoon-hyun commented on a change in pull request #31560:
URL: https://github.com/apache/spark/pull/31560#discussion_r577340685



##########
File path: sql/core/src/test/java/test/org/apache/spark/sql/connector/JavaSimpleWritableDataSource.java
##########
@@ -0,0 +1,374 @@
+/*
+ * 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 test.org.apache.spark.sql.connector;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.*;
+import org.apache.spark.deploy.SparkHadoopUtil;
+import org.apache.spark.sql.catalyst.InternalRow;
+import org.apache.spark.sql.catalyst.expressions.GenericInternalRow;
+import org.apache.spark.sql.connector.TestingV2Source;
+import org.apache.spark.sql.connector.catalog.SessionConfigSupport;
+import org.apache.spark.sql.connector.catalog.SupportsWrite;
+import org.apache.spark.sql.connector.catalog.Table;
+import org.apache.spark.sql.connector.read.InputPartition;
+import org.apache.spark.sql.connector.read.PartitionReader;
+import org.apache.spark.sql.connector.read.PartitionReaderFactory;
+import org.apache.spark.sql.connector.read.ScanBuilder;
+import org.apache.spark.sql.connector.write.*;
+import org.apache.spark.sql.types.StructType;
+import org.apache.spark.sql.util.CaseInsensitiveStringMap;
+import org.apache.spark.util.SerializableConfiguration;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.Arrays;
+import java.util.Iterator;

Review comment:
       nit. Could you re-order the import like the following grouping?
   ```java
   import java.io.BufferedReader;
   import java.io.IOException;
   import java.io.InputStreamReader;
   import java.util.Arrays;
   import java.util.Iterator;
   
   import org.apache.hadoop.conf.Configuration;
   import org.apache.hadoop.fs.*;
   
   import org.apache.spark.deploy.SparkHadoopUtil;
   import org.apache.spark.sql.catalyst.InternalRow;
   import org.apache.spark.sql.catalyst.expressions.GenericInternalRow;
   import org.apache.spark.sql.connector.TestingV2Source;
   import org.apache.spark.sql.connector.catalog.SessionConfigSupport;
   import org.apache.spark.sql.connector.catalog.SupportsWrite;
   import org.apache.spark.sql.connector.catalog.Table;
   import org.apache.spark.sql.connector.read.InputPartition;
   import org.apache.spark.sql.connector.read.PartitionReader;
   import org.apache.spark.sql.connector.read.PartitionReaderFactory;
   import org.apache.spark.sql.connector.read.ScanBuilder;
   import org.apache.spark.sql.connector.write.*;
   import org.apache.spark.sql.types.StructType;
   import org.apache.spark.sql.util.CaseInsensitiveStringMap;
   import org.apache.spark.util.SerializableConfiguration;
   ```




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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org