vboo123 commented on code in PR #59125:
URL: https://github.com/apache/spark/pull/59125#discussion_r4135384830


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetUtils.scala:
##########
@@ -361,16 +362,18 @@ object ParquetUtils extends Logging {
           case count: Count if 
V2ColumnUtils.extractV2Column(count.column).isDefined =>
             val colName = V2ColumnUtils.extractV2Column(count.column).get
             schemaName = "count(" + colName + ")"
-            rowCount += block.getRowCount
-            var isPartitionCol = false
-            if (partitionSchema.getFieldIndex(colName).isDefined) {
-              isPartitionCol = true
-            }
             isCount = true
-            if (!isPartitionCol) {
+            val partitionColIndex = partitionSchema.getFieldIndex(colName)

Review Comment:
   Makes sense. Making that change. 



##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetUtils.scala:
##########
@@ -361,16 +362,18 @@ object ParquetUtils extends Logging {
           case count: Count if 
V2ColumnUtils.extractV2Column(count.column).isDefined =>
             val colName = V2ColumnUtils.extractV2Column(count.column).get
             schemaName = "count(" + colName + ")"
-            rowCount += block.getRowCount
-            var isPartitionCol = false
-            if (partitionSchema.getFieldIndex(colName).isDefined) {
-              isPartitionCol = true
-            }
             isCount = true
-            if (!isPartitionCol) {
+            val partitionColIndex = partitionSchema.getFieldIndex(colName)

Review Comment:
   Makes sense. Making that change



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