Commit c252e9a
committed
fix(core): convert Arrow Text wrappers to ExprStringValue
PPL queries that route through the analytics-engine path can return Arrow
{@code org.apache.arrow.vector.util.Text} instances inside Map and List
fields (e.g. the {@code tokens} map of {@code patterns ...
show_numbered_token=true}). Arrow's Text class extends ReusableByteArray
and does not implement CharSequence, so the existing String branch in
{@code ExprValueUtils.fromObjectValue} doesn't match it and the fallback
throws "unsupported object class org.apache.arrow.vector.util.Text".
Detect the type by class name (avoids adding arrow-vector to the
{@code core} module's dependency graph just for one instanceof) and treat
it the same as a plain Java String.
Test impact: CalcitePPLPatternsIT 4/15 → 8/15 via the analytics-engine
route — all four SIMPLE pattern {@code show_numbered_token=true} variants
deserialize their result rows correctly now. Pairs with the OpenSearch
side commit that adds per-field {@code pattern_parser_get_pattern} /
{@code pattern_parser_get_tokens} scalar UDFs.
Signed-off-by: Kai Huang <ahkcs@amazon.com>1 parent 6bb8b7a commit c252e9a
1 file changed
Lines changed: 9 additions & 0 deletions
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
146 | 155 | | |
147 | 156 | | |
148 | 157 | | |
| |||
0 commit comments