PHILO-HE commented on code in PR #10525:
URL: 
https://github.com/apache/incubator-gluten/pull/10525#discussion_r2313390447


##########
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:
   @beliefer, `AbstractHiveTableScanExec` was introduced to fix code 
compatibility across different Spark versions. It resides in the shim layer to 
hold version-specific code for the corresponding Spark version. Therefore, I 
assume only `HiveTableScanExecTransformer` extends it, and no other classes 
will extend it in the future.
   



-- 
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]

Reply via email to