We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c43106 commit 45219bbCopy full SHA for 45219bb
flint-spark-integration/src/main/scala/org/apache/spark/sql/flint/datatype/FlintMetadataExtensions.scala
@@ -40,9 +40,13 @@ object FlintMetadataExtensions {
40
def keywordSubfield: Option[String] = {
41
if (metadata.contains(FIELDS_NAMES_KEY)) {
42
val multiFieldMetadata = metadata.getMetadata(FIELDS_NAMES_KEY)
43
- multiFieldMetadata
44
- .getStringArray(KEYWORD_TYPE)
45
- .headOption
+ if (multiFieldMetadata.contains(KEYWORD_TYPE)) {
+ multiFieldMetadata
+ .getStringArray(KEYWORD_TYPE)
46
+ .headOption
47
+ } else {
48
+ None
49
+ }
50
} else {
51
None
52
}
0 commit comments