From d1200bde951538f0e5ca61399f98c03a504a3b1c Mon Sep 17 00:00:00 2001 From: Arun Sharma Date: Sat, 21 Nov 2026 22:42:50 -0800 Subject: [PATCH] lance: add schema.cypher --- lance/scripts/gen_test_data.sh | 9 +++++++++ lance/test/lance_data/schema.cypher | 6 ++++++ 2 files changed, 15 insertions(+) create mode 100644 lance/test/lance_data/schema.cypher diff --git a/lance/scripts/gen_test_data.sh b/lance/scripts/gen_test_data.sh index b795e782..0a468021 100755 --- a/lance/scripts/gen_test_data.sh +++ b/lance/scripts/gen_test_data.sh @@ -14,5 +14,14 @@ mkdir -p "${OUT_DIR}" cargo run --quiet --manifest-path "${SCRIPT_DIR}/../rust/Cargo.toml" \ --example gen_fixtures -- "${OUT_DIR}" +cat > "${OUT_DIR}/schema.cypher" <<'EOF' +INSTALL LANCE; +LOAD LANCE; +CREATE NODE TABLE city(id INT32, name STRING, population INT64, PRIMARY KEY(id)) WITH (format = 'lance'); +CREATE NODE TABLE user(id INT32, name STRING, age INT64, PRIMARY KEY(id)) WITH (format = 'lance'); +CREATE REL TABLE follows(FROM user TO user, since INT32) WITH (format = 'lance'); +CREATE REL TABLE livesin(FROM user TO city) WITH (format = 'lance'); +EOF + echo "Wrote Lance fixtures to ${OUT_DIR}:" ls "${OUT_DIR}" diff --git a/lance/test/lance_data/schema.cypher b/lance/test/lance_data/schema.cypher new file mode 100644 index 00000000..57dfb573 --- /dev/null +++ b/lance/test/lance_data/schema.cypher @@ -0,0 +1,6 @@ +INSTALL LANCE; +LOAD LANCE; +CREATE NODE TABLE city(id INT32, name STRING, population INT64, PRIMARY KEY(id)) WITH (format = 'lance'); +CREATE NODE TABLE user(id INT32, name STRING, age INT64, PRIMARY KEY(id)) WITH (format = 'lance'); +CREATE REL TABLE follows(FROM user TO user, since INT32) WITH (format = 'lance'); +CREATE REL TABLE livesin(FROM user TO city) WITH (format = 'lance');