Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ private static Set<String> initAllowedKeywordAliases() {
"UNDROP", "UNFREEZE", "UNIQUE", "UNLOCK", "UNSET", "UNSIGNED", "UNTIL", "UPDATE", "URL", "USE",
"USER", "VALID", "VALUES", "VARYING", "VIEW", "VISIBLE", "VOLUME", "WATCH", "WATERMARK", "WEEK",
"WEEKS", "WHEN", "WITH_ITEMINDEX", "WK", "WORKER", "WORKLOAD", "WRITABLE", "WRITE", "WW",
"YEAR", "YEARS", "YY", "YYYY", "ZKPATH");
"YEAR", "YEARS", "YY", "YYYY", "ZKPATH",
// Append 04/01/2026.
"CENTURY", "DECADE", "DOW", "DOY", "EPOCH", "ISODOW", "ISOYEAR", "MILLENNIUM", "NATURAL", "SOME",
"ZONE"
);
}

private static Set<String> buildKeywordSet(String... values) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.util.Set;
import java.util.TreeSet;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;

/**
* Integration test for prepared statement. Testing SQL with prepared statement is main focus of this test.
Expand Down Expand Up @@ -139,10 +140,13 @@ public void testAllowedKeywordAliasesMatchSystemKeywords() throws Exception {

Set<String> missingFromAllowed = new TreeSet<>(nonReservedSystemKeywords);
missingFromAllowed.removeAll(allowedAliases);
String missingFromAllowedQuoted = missingFromAllowed.stream()
.map(keyword -> "\"" + keyword + "\"")
.collect(Collectors.joining(", ", "[", "]"));

Assert.assertTrue(missingFromAllowed.isEmpty(),
"New keywords found in system.keywords (non-reserved) that must be added to "
+ "ALLOWED_KEYWORD_ALIASES or reserved_keywords.txt: " + missingFromAllowed);
+ "ALLOWED_KEYWORD_ALIASES or reserved_keywords.txt: " + missingFromAllowedQuoted);
}

private List<String> loadKeywordsFromResource(String resourceName) throws Exception {
Expand Down
Loading