Github user chenghao-intel commented on the pull request:
https://github.com/apache/spark/pull/7305#issuecomment-120813751
@maropu Probably this is incorrect.
`Explode` actually only accept single child expression, which should be
either in `ArrayType` or `MapType`, pass in a `Star` probably not correct in
semantics, particularly the `star` can be expanded into couple of expressions.
And in `Analyzer`, seems you simply transform the generator from `Explode`
into `UserDefinedGenerator` if it contains `star`, that's not an `explode` any
more.
From the unit test code, probably the SQL like below can achieve the same
purpose.
···
Seq(("1", "1,2"), ("2", "4"), ("3", "7,8,9")).toDF("prefix",
"csv").registerTempTable("table")
SELECT prefix, csv, concat(prefix, ':', r) FROM table LATERAL VIEW
explode(split(csv,',')) d as r
···
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]