Skip to content

Commit 162032d

Browse files
committed
Fix IT
Signed-off-by: Peng Huo <[email protected]>
1 parent f48dd5e commit 162032d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

flint-spark-integration/src/main/scala/org/apache/spark/sql/flint/storage/FlintQueryCompiler.scala

+9-4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import scala.io.Source
99

1010
import org.apache.spark.sql.catalyst.expressions.Literal
1111
import org.apache.spark.sql.catalyst.util.{DateTimeUtils, TimestampFormatter}
12+
import org.apache.spark.sql.connector.catalog.CatalogV2Implicits.parseColumnPath
1213
import org.apache.spark.sql.connector.expressions.{Expression, FieldReference, LiteralValue}
1314
import org.apache.spark.sql.connector.expressions.filter.{And, Predicate}
1415
import org.apache.spark.sql.flint.datatype.FlintDataType.STRICT_DATE_OPTIONAL_TIME_FORMATTER_WITH_NANOS
@@ -152,10 +153,14 @@ case class FlintQueryCompiler(schema: StructType) {
152153
* return true if the field is Flint Text field.
153154
*/
154155
protected def isTextField(attribute: String): Boolean = {
155-
schema.apply(attribute) match {
156-
case StructField(_, StringType, _, metadata) =>
157-
FlintMetadataHelper.isTextField(metadata)
158-
case _ => false
156+
schema.findNestedField(parseColumnPath(attribute)) match {
157+
case Some((_, field)) =>
158+
field.dataType match {
159+
case StringType =>
160+
FlintMetadataHelper.isTextField(field.metadata)
161+
case _ => false
162+
}
163+
case None => false
159164
}
160165
}
161166

0 commit comments

Comments
 (0)