If an empty string is passed as "dictionary fields," ComplexArrowManualVisitor.results will throw a relatively unhelpful ArrayIndexOutOfBoundsException. It seems to be caused by this line:
val dictionaries = hints.get(ARROW_DICTIONARY_FIELDS).map(_.asInstanceOf[String].split(",").toSeq).getOrElse(Seq.empty)
If an empty string is passed as "dictionary fields,"
ComplexArrowManualVisitor.results
will throw a relatively unhelpfulArrayIndexOutOfBoundsException
. It seems to be caused by this line:(To my surprise)
"".split(",") == Array("")
. So when ComplexArrowManualVisitor.results gets the SimpleFeatureType index of attribute""
, it gets-1
. And then when it uses that index to get the attribute,getAttribute
throws anArrayIndexOutOfBoundsException
.It seems reasonable that, in this context, an empty string passed for "dictionary fields" should be interpreted as an empty array.