From 6e6360f9a2de31283e9059b5cf88befea788aee9 Mon Sep 17 00:00:00 2001 From: gnehil Date: Thu, 18 Jul 2024 18:27:23 +0800 Subject: [PATCH] fix setting empty --- .../main/scala/org/apache/doris/spark/sql/SchemaUtils.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spark-doris-connector/src/main/scala/org/apache/doris/spark/sql/SchemaUtils.scala b/spark-doris-connector/src/main/scala/org/apache/doris/spark/sql/SchemaUtils.scala index b639b368..e21c6f25 100644 --- a/spark-doris-connector/src/main/scala/org/apache/doris/spark/sql/SchemaUtils.scala +++ b/spark-doris-connector/src/main/scala/org/apache/doris/spark/sql/SchemaUtils.scala @@ -147,9 +147,9 @@ private[spark] object SchemaUtils { * @return inner schema struct */ def convertToSchema(tscanColumnDescs: Seq[TScanColumnDesc], settings: Settings): Schema = { - val readColumns = settings.getProperty(DORIS_READ_FIELD, "").split(",").map(_.replaceAll("`", "")) - val bitmapColumns = settings.getProperty(DORIS_BITMAP_COLUMNS, "").split(",") - val hllColumns = settings.getProperty(DORIS_HLL_COLUMNS, "").split(",") + val readColumns = settings.getProperty(DORIS_READ_FIELD, "").split(",").filter(_.nonEmpty).map(_.replaceAll("`", "")) + val bitmapColumns = settings.getProperty(DORIS_BITMAP_COLUMNS, "").split(",").filter(_.nonEmpty) + val hllColumns = settings.getProperty(DORIS_HLL_COLUMNS, "").split(",").filter(_.nonEmpty) val fieldList = fieldUnion(readColumns, bitmapColumns, hllColumns, tscanColumnDescs) val schema = new Schema(fieldList.length) fieldList.foreach(schema.put)