Skip to content

Commit f91bc2a

Browse files
authored
Merge pull request #1 from Xuanwo/xuanwo/lance-core-extension
Drop community source from Lance installs
2 parents 766a399 + 884e4b2 commit f91bc2a

8 files changed

Lines changed: 20 additions & 20 deletions

File tree

build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ function Build-Server {
275275
Write-Host " WARNING: Could not detect DuckDB version" -ForegroundColor Yellow
276276
}
277277
try {
278-
$extJson = & $duckBin -json -c "INSTALL lance FROM community; LOAD lance; SELECT extension_version FROM duckdb_extensions() WHERE extension_name='lance' AND loaded=true" 2>$null | Out-String
278+
$extJson = & $duckBin -json -c "INSTALL lance; LOAD lance; SELECT extension_version FROM duckdb_extensions() WHERE extension_name='lance' AND loaded=true" 2>$null | Out-String
279279
$extObj = $extJson | ConvertFrom-Json
280280
if ($extObj -and $extObj[0].extension_version) {
281281
$lanceVer = $extObj[0].extension_version
@@ -351,7 +351,7 @@ function Build-ServerAll {
351351
Write-Host " WARNING: Could not detect DuckDB version" -ForegroundColor Yellow
352352
}
353353
try {
354-
$extJson = & $duckBin -json -c "INSTALL lance FROM community; LOAD lance; SELECT extension_version FROM duckdb_extensions() WHERE extension_name='lance' AND loaded=true" 2>$null | Out-String
354+
$extJson = & $duckBin -json -c "INSTALL lance; LOAD lance; SELECT extension_version FROM duckdb_extensions() WHERE extension_name='lance' AND loaded=true" 2>$null | Out-String
355355
$extObj = $extJson | ConvertFrom-Json
356356
if ($extObj -and $extObj[0].extension_version) {
357357
$lanceVer = $extObj[0].extension_version

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ cmd_server() {
290290
echo " WARNING: Could not detect DuckDB version"
291291
fi
292292
local ext_json
293-
if ext_json=$("$duck_bin" -json -c "INSTALL lance FROM community; LOAD lance; SELECT extension_version FROM duckdb_extensions() WHERE extension_name='lance' AND loaded=true" 2>/dev/null); then
293+
if ext_json=$("$duck_bin" -json -c "INSTALL lance; LOAD lance; SELECT extension_version FROM duckdb_extensions() WHERE extension_name='lance' AND loaded=true" 2>/dev/null); then
294294
local lance_ver
295295
lance_ver=$(echo "$ext_json" | grep -o '"extension_version":"[^"]*"' | head -1 | cut -d'"' -f4)
296296
if [ -n "$lance_ver" ]; then
@@ -438,7 +438,7 @@ cmd_server_all() {
438438
fi
439439
fi
440440
local ext_json
441-
if ext_json=$("$duck_bin" -json -c "INSTALL lance FROM community; LOAD lance; SELECT extension_version FROM duckdb_extensions() WHERE extension_name='lance' AND loaded=true" 2>/dev/null); then
441+
if ext_json=$("$duck_bin" -json -c "INSTALL lance; LOAD lance; SELECT extension_version FROM duckdb_extensions() WHERE extension_name='lance' AND loaded=true" 2>/dev/null); then
442442
local lance_ver
443443
lance_ver=$(echo "$ext_json" | grep -o '"extension_version":"[^"]*"' | head -1 | cut -d'"' -f4)
444444
if [ -n "$lance_ver" ]; then

docs/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RSS-Lance uses **two database engines** for different jobs:
2323

2424
- **Windows / CLI build**: the persistent query subprocess runs with `:memory:`.
2525
`server.duckdb` is only opened once at startup by a one-shot process that runs
26-
`INSTALL lance FROM community` to cache the extension binary on disk. The main
26+
`INSTALL lance` to cache the extension binary on disk. The main
2727
query process then `LOAD`s the cached extension but runs entirely in memory.
2828
- **Linux / CGo build**: `server.duckdb` is opened as a file-backed DuckDB
2929
database that stays open for all queries. It still holds no user data -- just

server/db/duckdb_process_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func TestDuckDBProcessStartup(t *testing.T) {
7070
dbPath := filepath.Join(dataPath, "server.duckdb")
7171

7272
// Ensure extension is installed (Phase 1)
73-
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance FROM community;")
73+
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance;")
7474
cmd.CombinedOutput()
7575

7676
// Phase 2: start persistent process
@@ -96,7 +96,7 @@ func TestDuckDBProcessQuery(t *testing.T) {
9696
}
9797
dbPath := filepath.Join(dataPath, "server.duckdb")
9898

99-
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance FROM community;")
99+
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance;")
100100
cmd.CombinedOutput()
101101

102102
proc, err := newDuckDBProcess(duckdbBin, dbPath, dataPath)
@@ -131,7 +131,7 @@ func TestDuckDBProcessLanceQuery(t *testing.T) {
131131
}
132132
dbPath := filepath.Join(dataPath, "server.duckdb")
133133

134-
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance FROM community;")
134+
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance;")
135135
cmd.CombinedOutput()
136136

137137
proc, err := newDuckDBProcess(duckdbBin, dbPath, dataPath)
@@ -163,7 +163,7 @@ func TestDuckDBProcessEmptyResult(t *testing.T) {
163163
}
164164
dbPath := filepath.Join(dataPath, "server.duckdb")
165165

166-
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance FROM community;")
166+
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance;")
167167
cmd.CombinedOutput()
168168

169169
proc, err := newDuckDBProcess(duckdbBin, dbPath, dataPath)
@@ -190,7 +190,7 @@ func TestDuckDBProcessMultipleQueries(t *testing.T) {
190190
}
191191
dbPath := filepath.Join(dataPath, "server.duckdb")
192192

193-
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance FROM community;")
193+
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance;")
194194
cmd.CombinedOutput()
195195

196196
proc, err := newDuckDBProcess(duckdbBin, dbPath, dataPath)
@@ -219,7 +219,7 @@ func TestDuckDBProcessRestart(t *testing.T) {
219219
}
220220
dbPath := filepath.Join(dataPath, "server.duckdb")
221221

222-
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance FROM community;")
222+
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance;")
223223
cmd.CombinedOutput()
224224

225225
proc, err := newDuckDBProcess(duckdbBin, dbPath, dataPath)
@@ -273,7 +273,7 @@ func TestDuckDBProcessRestartRetry(t *testing.T) {
273273
}
274274
dbPath := filepath.Join(dataPath, "server.duckdb")
275275

276-
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance FROM community;")
276+
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance;")
277277
cmd.CombinedOutput()
278278

279279
proc, err := newDuckDBProcess(duckdbBin, dbPath, dataPath)
@@ -309,7 +309,7 @@ func TestDuckDBProcessConcurrentQueries(t *testing.T) {
309309
}
310310
dbPath := filepath.Join(dataPath, "server.duckdb")
311311

312-
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance FROM community;")
312+
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance;")
313313
cmd.CombinedOutput()
314314

315315
proc, err := newDuckDBProcess(duckdbBin, dbPath, dataPath)
@@ -360,7 +360,7 @@ func TestDuckDBProcessClose(t *testing.T) {
360360
}
361361
dbPath := filepath.Join(dataPath, "server.duckdb")
362362

363-
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance FROM community;")
363+
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance;")
364364
cmd.CombinedOutput()
365365

366366
proc, err := newDuckDBProcess(duckdbBin, dbPath, dataPath)
@@ -400,7 +400,7 @@ func TestDuckDBProcessDoubleRestart(t *testing.T) {
400400
}
401401
dbPath := filepath.Join(dataPath, "server.duckdb")
402402

403-
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance FROM community;")
403+
cmd := exec.Command(duckdbBin, dbPath, "-c", "INSTALL lance;")
404404
cmd.CombinedOutput()
405405

406406
proc, err := newDuckDBProcess(duckdbBin, dbPath, dataPath)

server/db/lance_cgo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func (s *cgoStore) bootstrap() error {
159159
// Install/load Lance extension and ATTACH data dir as Lance namespace.
160160
// For S3 paths, also install httpfs so DuckDB can read from S3.
161161
stmts := []string{
162-
`INSTALL lance FROM community`,
162+
`INSTALL lance`,
163163
`LOAD lance`,
164164
}
165165
if isCloudURI(s.dataPath) {

server/db/lance_cli.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ func (s *cliStore) bootstrap() error {
219219
if isCloudURI(s.dataPath) {
220220
extra = "INSTALL httpfs;\n"
221221
}
222-
stmts := fmt.Sprintf("INSTALL lance FROM community;\n%s", extra)
222+
stmts := fmt.Sprintf("INSTALL lance;\n%s", extra)
223223

224224
cmd := exec.Command(s.duckdbBin, s.dbPath, "-c", stmts)
225225
out, err := cmd.CombinedOutput()

tests/e2e_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def duckdb_query(data_path: str, sql: str) -> list[dict]:
377377

378378
dp = data_path.replace("\\", "/")
379379
preamble = (
380-
"INSTALL lance FROM community; LOAD lance; "
380+
"INSTALL lance; LOAD lance; "
381381
f"ATTACH '{dp}' AS _lance (TYPE LANCE); "
382382
)
383383
full_sql = preamble + sql

tests/python/test_duckdb_persistent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def send_query(proc, sql):
100100

101101
result = subprocess.run(
102102
[str(DUCKDB_BIN), DB_PATH, "-c",
103-
"INSTALL lance FROM community;"],
103+
"INSTALL lance;"],
104104
capture_output=True, text=True, timeout=30,
105105
)
106106
print(f" exit code: {result.returncode}")
@@ -321,7 +321,7 @@ def __init__(self, duckdb_bin, db_path, lance_path):
321321
# Bootstrap: LOAD, ATTACH, then sentinel
322322
with self.lock:
323323
boot = (
324-
f"INSTALL lance FROM community;\n"
324+
f"INSTALL lance;\n"
325325
f"LOAD lance;\n"
326326
f"ATTACH IF NOT EXISTS '{lance_path}' AS _lance (TYPE LANCE);\n"
327327
)

0 commit comments

Comments
 (0)