You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2022/09/08 06:03:35 UTC

[GitHub] [phoenix] stoty commented on a diff in pull request #1490: PHOENIX-6764 Implement Binary and Hexadecimal literals

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


##########
phoenix-core/src/test/java/org/apache/phoenix/parse/QueryParserTest.java:
##########
@@ -925,6 +925,31 @@ public void testShowCreateTable() throws Exception {
         // Expected failures.
         parseQueryThatShouldFail("SHOW CREATE VIEW foo");
         parseQueryThatShouldFail("SHOW CREATE TABLE 'foo'");
+    }
+
+    @Test
+    public void testBinaryLiteral() throws Exception {
+        // Happy paths
+        parseQuery("SELECT b, x from x WHERE x = x'00'");
+        parseQuery("SELECT b, x from x WHERE x = "
+                + "x  '0 12 ' --comment \n /* comment */ '34 567' \n \n 'aA'");
+        parseQuery("SELECT b, x from x WHERE x = "
+                + "b  '0 10 ' --comment \n /* comment */ '10 101' \n \n '00000000'");
 
+        // Expected failures.

Review Comment:
   Thanks.
   I've misread the grammar in the standard, space is allowed before and after digits, but not between X and ' , as you would expect.



-- 
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@phoenix.apache.org

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