stevenzwu commented on code in PR #5601:
URL: https://github.com/apache/iceberg/pull/5601#discussion_r953011191
##########
api/src/main/java/org/apache/iceberg/transforms/Transform.java:
##########
@@ -124,9 +142,47 @@ default boolean isIdentity() {
*
* @param value a transformed value
* @return a human-readable String representation of the value
+ * @deprecated use {@link #toHumanString(Type, Object)} instead; will be
removed in 2.0.0
*/
+ @Deprecated
default String toHumanString(T value) {
- return String.valueOf(value);
+ if (value instanceof ByteBuffer) {
+ return TransformUtil.base64encode(((ByteBuffer) value).duplicate());
Review Comment:
Got it. Looking at the `Base64#encode` method, it change the position of the
source buffer. should we just save the position and restore it after the
encoding is done?
```
Encodes all remaining bytes from the specified byte buffer into a
newly-allocated ByteBuffer using the Base64 encoding scheme. Upon return, the
source buffer's position will be updated to its limit; its limit will not have
been changed. The returned output buffer's position will be zero and its limit
will be the number of resulting encoded bytes.
```
--
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]