wenfang6 opened a new issue, #10103:
URL: https://github.com/apache/incubator-gluten/issues/10103
### Backend
VL (Velox)
### Bug description
sql like this has the error. Invalid call to dataType on unresolved object
example:
```
CREATE TABLE map_test_gluten (
sessionid STRING,
features MAP<STRING, STRING>)
USING parquet;
INSERT overwrite dap_dev.map_test_gluten VALUES
(
'session_001',
map(
'118', 'geek_position_1',
'125', 'boss_position_1',
'tag', 'abc'
)
),
(
'session_002',
map(
'118', 'geek_position_2',
'125', 'boss_position_2',
'tag', 'xyz'
)
);
query:
select
/*+ REPARTITION(2) */
a.features,
a.geek_position
from
(select features,features ['118'] as geek_position from
dap_dev.map_test_gluten) a
```
error:
```
org.apache.spark.sql.catalyst.analysis.UnresolvedException: Invalid call to
dataType on unresolved object
at
org.apache.spark.sql.catalyst.analysis.UnresolvedAttribute.dataType(unresolved.scala:160)
at
org.apache.spark.sql.types.StructType$.$anonfun$fromAttributes$1(StructType.scala:548)
at scala.collection.immutable.List.map(List.scala:293)
at
org.apache.spark.sql.types.StructType$.fromAttributes(StructType.scala:548)
at
org.apache.spark.sql.catalyst.plans.QueryPlan.schema$lzycompute(QueryPlan.scala:372)
at
org.apache.spark.sql.catalyst.plans.QueryPlan.schema(QueryPlan.scala:372)
at
org.apache.gluten.execution.ValidatablePlan.doValidate(WholeStageTransformer.scala:74)
at
org.apache.gluten.execution.ValidatablePlan.doValidate$(WholeStageTransformer.scala:72)
at
org.apache.gluten.execution.ProjectExecTransformerBase.doValidate(BasicPhysicalOperatorTransformer.scala:179)
at
org.apache.gluten.extension.columnar.CollapseProjectExecTransformer$$anonfun$apply$1.applyOrElse(CollapseProjectExecTransformer.scala:42)
at
org.apache.gluten.extension.columnar.CollapseProjectExecTransformer$$anonfun$apply$1.applyOrElse(CollapseProjectExecTransformer.scala:33)
```
### Gluten version
Gluten-1.3
### Spark version
Spark-3.5.x
### Spark configurations
_No response_
### System information
_No response_
### Relevant logs
```bash
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]