Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sql syntax error user #16583

Merged
merged 4 commits into from
Jun 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
* add test
  • Loading branch information
zachjsh committed Jun 11, 2024
commit 5d730475dca1c90cc2fd4abc15d890a1d812acb1
Original file line number Diff line number Diff line change
Expand Up @@ -1626,6 +1626,18 @@ public void testInsertWithInvalidSelectStatement()
.verify();
}

@Test
public void testInsertWithLongIdentifer()
{
// This test fails because an identifer is specified of length 200, which exceeds the length limit of 128
// characters.
String longIdentifer = new String(new char[200]).replace('\0', 'a');
testIngestionQuery()
.sql(StringUtils.format("INSERT INTO t SELECT %s FROM foo PARTITIONED BY ALL", longIdentifer)) // count is a keyword
.expectValidationError(invalidSqlContains(StringUtils.format("Length of identifier '%s' must be less than or equal to 128 characters", longIdentifer)))
.verify();
}

@Test
public void testInsertWithUnnamedColumnInSelectStatement()
{
Expand Down
Loading