-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial support for Python UDFs (#736)
- Loading branch information
Showing
35 changed files
with
1,433 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ALTER TABLE udfs ADD COLUMN language VARCHAR(15) NOT NULL DEFAULT 'rust'; | ||
ALTER TABLE udfs ALTER COLUMN dylib_url DROP NOT NULL; | ||
ALTER TABLE udfs ALTER COLUMN dylib_url DROP DEFAULT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
crates/arroyo-api/sqlite_migrations/V2__add_udf_language.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
CREATE TABLE udfs_new ( | ||
pub_id TEXT PRIMARY KEY, | ||
organization_id TEXT NOT NULL, | ||
created_by TEXT NOT NULL, | ||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, | ||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, | ||
prefix TEXT, | ||
name TEXT NOT NULL, | ||
definition TEXT NOT NULL, | ||
description TEXT, | ||
dylib_url TEXT, | ||
language VARCHAR(15) NOT NULL DEFAULT 'rust', | ||
UNIQUE (organization_id, name) | ||
); | ||
|
||
-- Copy data from the old table to the nfew table | ||
INSERT INTO udfs_new (pub_id, organization_id, created_by, created_at, updated_at, | ||
prefix, name, definition, description, dylib_url, language) | ||
SELECT pub_id, organization_id, created_by, created_at, updated_at, | ||
prefix, name, definition, description, dylib_url, 'rust' | ||
from udfs; | ||
|
||
-- Drop the old table | ||
DROP TABLE udfs; | ||
|
||
-- Rename the new table to the old table name | ||
ALTER TABLE udfs_new RENAME TO udfs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.