@@ -255,9 +255,9 @@ public void testLimitToPreventStackOverflowFromLargeBinaryBooleanExpression() {
255
255
// 1000 elements is ok
256
256
new SqlParser ().createExpression (join (" OR " , nCopies (1000 , "a = b" )));
257
257
258
- // 5000 elements cause stack overflow
258
+ // 10000 elements cause stack overflow
259
259
ParsingException e = expectThrows (ParsingException .class , () ->
260
- new SqlParser ().createExpression (join (" OR " , nCopies (5000 , "a = b" ))));
260
+ new SqlParser ().createExpression (join (" OR " , nCopies (10000 , "a = b" ))));
261
261
assertThat (e .getMessage (),
262
262
startsWith ("line -1:0: SQL statement is too large, causing stack overflow when generating the parsing tree: [" ));
263
263
}
@@ -271,7 +271,7 @@ public void testLimitToPreventStackOverflowFromLargeUnaryArithmeticExpression()
271
271
272
272
// 5000 elements cause stack overflow
273
273
ParsingException e = expectThrows (ParsingException .class , () -> new SqlParser ().createExpression (
274
- join ("" , nCopies (1000 , "abs(" )).concat ("i" ).concat (join ("" , nCopies (1000 , ")" )))));
274
+ join ("" , nCopies (5000 , "abs(" )).concat ("i" ).concat (join ("" , nCopies (5000 , ")" )))));
275
275
assertThat (e .getMessage (),
276
276
startsWith ("line -1:0: SQL statement is too large, causing stack overflow when generating the parsing tree: [" ));
277
277
}
@@ -282,9 +282,9 @@ public void testLimitToPreventStackOverflowFromLargeBinaryArithmeticExpression()
282
282
// 1000 elements is ok
283
283
new SqlParser ().createExpression (join (" + " , nCopies (1000 , "a" )));
284
284
285
- // 5000 elements cause stack overflow
285
+ // 10000 elements cause stack overflow
286
286
ParsingException e = expectThrows (ParsingException .class , () ->
287
- new SqlParser ().createExpression (join (" + " , nCopies (5000 , "a" ))));
287
+ new SqlParser ().createExpression (join (" + " , nCopies (10000 , "a" ))));
288
288
assertThat (e .getMessage (),
289
289
startsWith ("line -1:0: SQL statement is too large, causing stack overflow when generating the parsing tree: [" ));
290
290
}
@@ -298,11 +298,11 @@ public void testLimitToPreventStackOverflowFromLargeSubselectTree() {
298
298
.concat ("t" )
299
299
.concat (join ("" , nCopies (199 , ")" ))));
300
300
301
- // 500 elements cause stack overflow
301
+ // 1000 elements cause stack overflow
302
302
ParsingException e = expectThrows (ParsingException .class , () -> new SqlParser ().createStatement (
303
- join (" (" , nCopies (500 , "SELECT * FROM" ))
303
+ join (" (" , nCopies (1000 , "SELECT * FROM" ))
304
304
.concat ("t" )
305
- .concat (join ("" , nCopies (499 , ")" )))));
305
+ .concat (join ("" , nCopies (999 , ")" )))));
306
306
assertThat (e .getMessage (),
307
307
startsWith ("line -1:0: SQL statement is too large, causing stack overflow when generating the parsing tree: [" ));
308
308
}
0 commit comments