You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/07/02 04:33:00 UTC

[GitHub] [iceberg] wuwenchi opened a new pull request, #4725: Docs: add types supported by truncate

wuwenchi opened a new pull request, #4725:
URL: https://github.com/apache/iceberg/pull/4725

   In fact, truncate also supports the binary type:
   
   ```java
   abstract class Truncate<T> implements Transform<T, T> {
     @SuppressWarnings("unchecked")
     static <T> Truncate<T> get(Type type, int width) {
       Preconditions.checkArgument(width > 0,
           "Invalid truncate width: %s (must be > 0)", width);
   
       switch (type.typeId()) {
         case INTEGER:
           return (Truncate<T>) new TruncateInteger(width);
         case LONG:
           return (Truncate<T>) new TruncateLong(width);
         case DECIMAL:
           return (Truncate<T>) new TruncateDecimal(width);
         case STRING:
           return (Truncate<T>) new TruncateString(width);
         case BINARY:
           return (Truncate<T>) new TruncateByteBuffer(width);
         default:
           throw new UnsupportedOperationException(
               "Cannot truncate type: " + type);
       }
     }
   ```
   
   so, add `binary` type, from:
   ```
   | truncate[W] | Value truncated to width `W` (see below)  | `int`, `long`, `decimal`, `string`                              
   ```
   to
   ```
   | truncate[W] | Value truncated to width `W` (see below) | `int`, `long`, `decimal`, `string`, `binary`                             
   ```


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] wuwenchi commented on pull request #4725: Docs: add types supported by truncate

Posted by GitBox <gi...@apache.org>.
wuwenchi commented on PR #4725:
URL: https://github.com/apache/iceberg/pull/4725#issuecomment-1123231802

   Can you help check it ? Thx! @kbendick 


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] wuwenchi closed pull request #4725: Docs: add types supported by truncate

Posted by GitBox <gi...@apache.org>.
wuwenchi closed pull request #4725: Docs: add types supported by truncate
URL: https://github.com/apache/iceberg/pull/4725


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Docs: add types supported by truncate [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4725:
URL: https://github.com/apache/iceberg/pull/4725#issuecomment-2276927914

   This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Docs: add types supported by truncate [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #4725: Docs: add types supported by truncate
URL: https://github.com/apache/iceberg/pull/4725


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Docs: add types supported by truncate [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4725:
URL: https://github.com/apache/iceberg/pull/4725#issuecomment-2294473329

   This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org