mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-27 04:53:59 +00:00
fix(sql)!: request JSON for materialized view descriptions
Apply the reviewed materialized view change.
This commit is contained in:
@@ -92,10 +92,13 @@ async def test_remote_refresh_reports_unknown_metrics(
|
||||
return flight.RecordBatchStream(
|
||||
pa.table(
|
||||
{
|
||||
"name": ["view"],
|
||||
"query": ["SELECT * FROM source"],
|
||||
"description": [
|
||||
json.dumps(
|
||||
{"name": "view", "query": "SELECT * FROM source"}
|
||||
)
|
||||
],
|
||||
}
|
||||
)
|
||||
).replace_schema_metadata({b"lancedb.describe.format": b"json"})
|
||||
)
|
||||
assert b"REFRESH MATERIALIZED VIEW" in ticket.ticket
|
||||
# SQL completion carries no refresh statistics.
|
||||
@@ -151,7 +154,8 @@ async def test_remote_refresh_reports_unknown_metrics(
|
||||
assert len(describes) == 2
|
||||
assert len(refreshes) == 1
|
||||
assert all(
|
||||
b'DESCRIBE MATERIALIZED VIEW "view"' in command for command in describes
|
||||
b'DESCRIBE MATERIALIZED VIEW "view" FORMAT JSON' in command
|
||||
for command in describes
|
||||
)
|
||||
(refresh,) = refreshes
|
||||
assert b'REFRESH MATERIALIZED VIEW "view"' in refresh
|
||||
|
||||
Reference in New Issue
Block a user