drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [drill] KazydubB commented on a change in pull request #1671: DRILL-7045 UDF string_binary java.lang.IndexOutOfBoundsException
Date Tue, 12 Mar 2019 09:49:25 GMT
KazydubB commented on a change in pull request #1671: DRILL-7045 UDF string_binary java.lang.IndexOutOfBoundsException
URL: https://github.com/apache/drill/pull/1671#discussion_r264593495
 
 

 ##########
 File path: exec/java-exec/src/test/java/org/apache/drill/exec/vector/complex/writer/TestJsonNanInf.java
 ##########
 @@ -236,6 +236,22 @@ public void testConvertFromJsonFunction() throws Exception {
 
 
 
+  @Test
+  public void testLargeStringBinary() throws Exception {
+    String chunk = "0123456789";
+    StringBuilder builder = new StringBuilder();
+    for (int i = 0; i < 1000; i++) {
+      builder.append(chunk);
+    }
+    String data = builder.toString();
+    String query = String.format("select string_binary(binary_string('%s')) from (values(1))",
data);
 
 Review comment:
   Please change 
   ```
   String query = String.format("select string_binary(binary_string('%s')) from (values(1))",
data);
   List<QueryDataBatch> results = testSqlWithResults(query);
   RecordBatchLoader batchLoader = new RecordBatchLoader(getAllocator());
   QueryDataBatch batch = results.get(0);
   batch.release();
   batchLoader.clear();
   ```
   to 
   ```
   test("select string_binary(binary_string('%s')) from (values(1))", data);
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message