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_r262868191
##########
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";
+ String data = "";
+ for (int i = 0; i < 1000; i++) {
+ data += chunk;
+ }
+ String query = String.format("select string_binary(binary_string('%s'))
from (values(1))", data);
+ List<QueryDataBatch> results = testSqlWithResults(query);
+ RecordBatchLoader batchLoader = new RecordBatchLoader(getAllocator());
+ assertTrue("Query result must contain 1 row", results.size() == 1);
Review comment:
`select ... from values(1)` will yield one row only and the assertion makes
no sense (such checks are useful when querying from other datasources). Please,
remove it.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services