laskoviymishka commented on code in PR #1130:
URL: https://github.com/apache/iceberg-go/pull/1130#discussion_r3305884678


##########
table/substrait/substrait.go:
##########
@@ -258,6 +260,15 @@ func toByteSliceSubstraitLiteral[T []byte | types.UUID](v 
T) expr.Literal {
        return expr.NewByteSliceLiteral(v, false)
 }
 
+// hostIsLittleEndian reports whether decimal128.Num's in-memory layout already
+// matches the Substrait 16-byte little-endian two's-complement encoding. True
+// on x86, arm64, and other LE architectures; false on s390x and other BE.
+var hostIsLittleEndian = func() bool {
+       var probe uint16 = 1
+
+       return *(*byte)(unsafe.Pointer(&probe)) == 1
+}()

Review Comment:
   want to avoid extra file :)
   but yeah, this make sense



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