gnehil commented on code in PR #161:
URL:
https://github.com/apache/doris-spark-connector/pull/161#discussion_r1410127231
##########
spark-doris-connector/src/main/scala/org/apache/spark/sql/doris/spark/ArrowSchemaUtils.scala:
##########
@@ -0,0 +1,11 @@
+package org.apache.spark.sql.doris.spark
+
+import org.apache.arrow.vector.types.pojo.Schema
+import org.apache.spark.sql.types.StructType
+import org.apache.spark.sql.util.ArrowUtils
+
+object ArrowSchemaUtils {
+ def toArrowSchema(schema: StructType, timeZoneId: String): Schema = {
Review Comment:
Please add a unit test for this function.
##########
spark-doris-connector/src/main/java/org/apache/doris/spark/load/RecordBatch.java:
##########
@@ -58,21 +62,29 @@ public class RecordBatch {
private final boolean addDoubleQuotes;
- private RecordBatch(Iterator<InternalRow> iterator, String format, String
sep, byte[] delim,
+ private VectorSchemaRoot arrowRoot = null;
+
+ private int arrowBatchSize = 1000;
Review Comment:
Can this variable be configured? Or is this the best performance value
obtained through testing?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]