codope commented on code in PR #12993:
URL: https://github.com/apache/hudi/pull/12993#discussion_r2011267331


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/ColumnStatsIndexSupport.scala:
##########
@@ -455,10 +456,10 @@ object ColumnStatsIndexSupport {
       case w: LongWrapper => w.getValue
       case w: FloatWrapper => w.getValue
       case w: DoubleWrapper => w.getValue
+      case w: DecimalWrapper => w.getValue  // Moved above BytesWrapper to 
ensure proper matching

Review Comment:
   The issue is DecimalWrapper is a subtype of BytesWrapper - 
`{"name":"value","type":{"type":"bytes","logicalType":"decimal","precision":30,"scale":15}}`.
 So the BytesWrapper case is being triggered first. That is why this 
reordering. This reordering should not affect other types. Only those that have 
logical types as Decimal will get matched first.
   
   That said, maybe we can write a more generic solution inferring from 
combination of type and logical type. We can take it up as a followup. This PR 
will unblock the main isue.



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

Reply via email to