Skip to content

Commit 90f2cd6

Browse files
committed
more tests and cases
1 parent 491321f commit 90f2cd6

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

fdb-relational-core/src/main/java/com/apple/foundationdb/relational/recordlayer/query/SemanticAnalyzer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ public static void validateLimit(@Nonnull Expression expression) {
743743
}
744744

745745
public static void validateDatabaseUri(@Nonnull Identifier path) {
746-
Assert.thatUnchecked(Objects.requireNonNull(path.getName()).matches("/\\w[a-zA-Z0-9_/]*\\w"),
746+
Assert.thatUnchecked(Objects.requireNonNull(path.getName()).startsWith("/"),
747747
ErrorCode.INVALID_PATH, () -> String.format(Locale.ROOT, "invalid database path '%s'", path));
748748
}
749749

yaml-tests/src/test/resources/valid-identifiers.yamsql

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,4 +249,24 @@ test_block:
249249
-
250250
- query: DELETE FROM "foo.tableA" WHERE "foo.tableA.A2" = 100
251251
- count: 2
252+
---
253+
setup:
254+
connect: "jdbc:embed:/__SYS?schema=CATALOG"
255+
steps:
256+
- query: drop schema template if exists "टेम्पलेट"
257+
- query: create schema template "टेम्पलेट" create table T1(a1 bigint, primary key(a1))
258+
---
259+
test_block:
260+
connect: "jdbc:embed:/__SYS?schema=CATALOG"
261+
tests:
262+
-
263+
- query: select count(*) from "TEMPLATES" where template_name = 'टेम्पलेट'
264+
- result: [{1}]
265+
# This does not work entirely, but theoretically should be possible!
266+
#---
267+
#setup:
268+
# connect: "jdbc:embed:/__SYS?schema=CATALOG"
269+
# steps:
270+
# - query: drop database if exists "/frl/डेटाबेस"
271+
# - query: create database "/frl/डेटाबेस"
252272
...

0 commit comments

Comments
 (0)