Skip to content

Commit decf662

Browse files
test: add unit test for issue #1778
1 parent c9dce62 commit decf662

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/test/java/net/sf/jsqlparser/statement/select/SelectTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5779,4 +5779,13 @@ void testInnerJoin() throws JSQLParserException {
57795779
assertFalse(join.withRight(true).isInnerJoin());
57805780
assertFalse(join.withInner(true).isRight());
57815781
}
5782+
5783+
@Test
5784+
void testArrayColumnsIssue1757() throws JSQLParserException {
5785+
String sqlStr = "SELECT my_map['my_key'] FROM my_table WHERE id = 123";
5786+
assertSqlCanBeParsedAndDeparsed(sqlStr, true);
5787+
5788+
sqlStr = "SELECT cast(my_map['my_key'] as int) FROM my_table WHERE id = 123";
5789+
assertSqlCanBeParsedAndDeparsed(sqlStr, true);
5790+
}
57825791
}

src/test/java/net/sf/jsqlparser/statement/update/UpdateTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ public void testUpdateSetsIssue1590() throws JSQLParserException {
341341
}
342342

343343
@Test
344-
void testIssue() throws JSQLParserException {
344+
void testArrayColumnsIssue1083() throws JSQLParserException {
345345
String sqlStr = "SELECT listes[(SELECT cardinality(listes))]";
346346
assertSqlCanBeParsedAndDeparsed(sqlStr, true);
347347

0 commit comments

Comments
 (0)