beliefer commented on code in PR #10525:
URL:
https://github.com/apache/incubator-gluten/pull/10525#discussion_r2299709282
##########
gluten-substrait/src/main/scala/org/apache/spark/sql/hive/HiveTableScanExecTransformer.scala:
##########
@@ -63,12 +63,12 @@ case class HiveTableScanExecTransformer(
override def getMetadataColumns(): Seq[AttributeReference] = Seq.empty
- override def outputAttributes(): Seq[Attribute] = {
- if (prunedOutput.nonEmpty) {
- prunedOutput
- } else {
- output
- }
+ override val output: Seq[Attribute] = if (prunedOutput.nonEmpty) {
+ prunedOutput
+ } else {
+ // Retrieve the original attributes based on expression ID so that
capitalization matches.
+ val originalAttributes = AttributeMap(relation.output.map(a => a -> a))
+ requestedAttributes.map(attr => originalAttributes.getOrElse(attr,
attr)).distinct
Review Comment:
It sounds we can override the output for `AbstractHiveTableScanExec`
directly.
But it seems the other subclass of AbstractHiveTableScanExec will be added.
What about your opinion? @zhztheplayer
--
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]