[ 
https://issues.apache.org/jira/browse/PHOENIX-6764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17597535#comment-17597535
 ] 

ASF GitHub Bot commented on PHOENIX-6764:
-----------------------------------------

stoty commented on code in PR #1490:
URL: https://github.com/apache/phoenix/pull/1490#discussion_r958017290


##########
phoenix-core/src/main/java/org/apache/phoenix/util/ByteUtil.java:
##########
@@ -56,7 +56,34 @@ public class ByteUtil {
             EMPTY_BYTE_ARRAY);
     public static final ImmutableBytesWritable EMPTY_IMMUTABLE_BYTE_ARRAY = 
new ImmutableBytesWritable(
             EMPTY_BYTE_ARRAY);
-    
+
+
+    /** Mask for bit 0 of a byte. */
+    private static final int BIT_0 = 1;

Review Comment:
   Becuse that's how it's written in commons-codec where I copied this from.
   
   But you're right, it's more consistent to use 0x01 here.





> Implement Binary and Hexadecimal literals
> -----------------------------------------
>
>                 Key: PHOENIX-6764
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6764
>             Project: Phoenix
>          Issue Type: Bug
>          Components: core
>            Reporter: Istvan Toth
>            Assignee: Istvan Toth
>            Priority: Major
>
> Currently there is no sane way to specify arbitrary binary and varbinary 
> values in the query string.
> They can be set as variables for preparedstatements, and if the length 
> corresponds to an existing type, then some casting gymnastics can be used to 
> work around the problem, but I have not found a way to write a query that 
> upserts an arbitrary three byte value into a binary/varbinary.
> The SQL standard defines Binary and Hex literals in the form of 
> B'01010101001...' and X'0102AAF5...'
> Implement this in the parser.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to