jnturton commented on PR #2597:
URL: https://github.com/apache/drill/pull/2597#issuecomment-1190101257

   > Yes, please add such a test. We have test methods that allow obtaining row 
set for query results. Doesn't this issue is reproduced when they are used?
   
   If I correctly understand the test you intend (my implementation is shown 
below) then the answer is that it does not reproduce the issue...
   
   ```
     @Test
     public void testWideningLimit() throws Exception {
       String query = "SELECT CAST(10 AS DECIMAL(38, 4)) AS `Col1` UNION ALL 
SELECT CAST(22 AS DECIMAL(29, 6)) AS `Col1`";
   
       testBuilder().sqlQuery(query)
         .unOrdered()
         .baselineColumns("Col1")
         .baselineValues(new BigDecimal("10"))
         .baselineValues(new BigDecimal("22"))
         .go();
         
       List<Pair<SchemaPath, TypeProtos.MajorType>> expectedSchema = 
Collections.singletonList(Pair.of(
           SchemaPath.getSimplePath("Col1"),
           Types.withPrecisionAndScale(MinorType.VARDECIMAL, DataMode.REQUIRED, 
38, 6)));
   
       testBuilder()
           .sqlQuery(query)
           .schemaBaseLine(expectedSchema)
           .go();
     }
   ```


-- 
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: dev-unsubscr...@drill.apache.org

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

Reply via email to