diff --git a/Cargo.lock b/Cargo.lock
index fd0a73af29b27..f90c1d41690f0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -716,11 +716,28 @@ dependencies = [
"regex-syntax 0.8.2",
]
+[[package]]
+name = "arrow-udf-flight"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4adb3a066bd22fb520bc3d040d9d59ee54f320c21faeb6df815ea20445c80c54"
+dependencies = [
+ "arrow-array 50.0.0",
+ "arrow-flight",
+ "arrow-schema 50.0.0",
+ "arrow-select 50.0.0",
+ "futures-util",
+ "thiserror",
+ "tokio",
+ "tonic 0.10.2",
+ "tracing",
+]
+
[[package]]
name = "arrow-udf-js"
-version = "0.1.2"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "252b6355ad1e57eb6454b705c51652de55aa22eb018cdb95be0dbf62ee3ec78f"
+checksum = "0519711e77180c5fe9891b81d912d937864894c77932b5df52169966f4a948bb"
dependencies = [
"anyhow",
"arrow-array 50.0.0",
@@ -732,7 +749,7 @@ dependencies = [
[[package]]
name = "arrow-udf-js-deno"
version = "0.0.1"
-source = "git+https://github.com/risingwavelabs/arrow-udf.git?rev=23fe0dd#23fe0dd41616f4646f9139e22a335518e6cc9a47"
+source = "git+https://github.com/risingwavelabs/arrow-udf.git?rev=fa36365#fa3636559de986aa592da6e8b3fbfac7bdd4bb78"
dependencies = [
"anyhow",
"arrow-array 50.0.0",
@@ -754,7 +771,7 @@ dependencies = [
[[package]]
name = "arrow-udf-js-deno-runtime"
version = "0.0.1"
-source = "git+https://github.com/risingwavelabs/arrow-udf.git?rev=23fe0dd#23fe0dd41616f4646f9139e22a335518e6cc9a47"
+source = "git+https://github.com/risingwavelabs/arrow-udf.git?rev=fa36365#fa3636559de986aa592da6e8b3fbfac7bdd4bb78"
dependencies = [
"anyhow",
"deno_ast",
@@ -782,7 +799,8 @@ dependencies = [
[[package]]
name = "arrow-udf-python"
version = "0.1.0"
-source = "git+https://github.com/risingwavelabs/arrow-udf.git?rev=6c32f71#6c32f710b5948147f8214797fc334a4a3cadef0d"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41eaaa010b9cf07bedda6f1dafa050496e96fff7ae4b9602fb77c25c24c64cb7"
dependencies = [
"anyhow",
"arrow-array 50.0.0",
@@ -796,9 +814,9 @@ dependencies = [
[[package]]
name = "arrow-udf-wasm"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59a51355b8ca4de8ae028e5efb45c248dad4568cde6707f23b89f9b86a907f36"
+checksum = "eb829e25925161d93617d4b053bae03fe51e708f2cce088d85df856011d4f369"
dependencies = [
"anyhow",
"arrow-array 50.0.0",
@@ -1658,7 +1676,7 @@ dependencies = [
"cfg-if",
"libc",
"miniz_oxide",
- "object",
+ "object 0.32.1",
"rustc-demangle",
]
@@ -2728,18 +2746,18 @@ dependencies = [
[[package]]
name = "cranelift-bforest"
-version = "0.106.1"
+version = "0.107.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b3775cc6cc00c90d29eebea55feedb2b0168e23f5415bab7859c4004d7323d1"
+checksum = "79b27922a6879b5b5361d0a084cb0b1941bf109a98540addcb932da13b68bed4"
dependencies = [
"cranelift-entity",
]
[[package]]
name = "cranelift-codegen"
-version = "0.106.1"
+version = "0.107.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "637f3184ba5bfa48d425bad1d2e4faf5fcf619f5e0ca107edc6dc02f589d4d74"
+checksum = "304c455b28bf56372729acb356afbb55d622f2b0f2f7837aa5e57c138acaac4d"
dependencies = [
"bumpalo",
"cranelift-bforest",
@@ -2758,33 +2776,33 @@ dependencies = [
[[package]]
name = "cranelift-codegen-meta"
-version = "0.106.1"
+version = "0.107.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4b35b8240462341d94d31aab807cad704683988708261aecae3d57db48b7212"
+checksum = "1653c56b99591d07f67c5ca7f9f25888948af3f4b97186bff838d687d666f613"
dependencies = [
"cranelift-codegen-shared",
]
[[package]]
name = "cranelift-codegen-shared"
-version = "0.106.1"
+version = "0.107.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f3cd1555aa9df1d6d8375732de41b4cb0d787006948d55b6d004d521e9efeb0"
+checksum = "f5b6a9cf6b6eb820ee3f973a0db313c05dc12d370f37b4fe9630286e1672573f"
[[package]]
name = "cranelift-control"
-version = "0.106.1"
+version = "0.107.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "14b31a562a10e98ab148fa146801e20665c5f9eda4fce9b2c5a3836575887d74"
+checksum = "d9d06e6bf30075fb6bed9e034ec046475093392eea1aff90eb5c44c4a033d19a"
dependencies = [
"arbitrary",
]
[[package]]
name = "cranelift-entity"
-version = "0.106.1"
+version = "0.107.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af1e0467700a3f4fccf5feddbaebdf8b0eb82535b06a9600c4bc5df40872e75d"
+checksum = "29be04f931b73cdb9694874a295027471817f26f26d2f0ebe5454153176b6e3a"
dependencies = [
"serde",
"serde_derive",
@@ -2792,9 +2810,9 @@ dependencies = [
[[package]]
name = "cranelift-frontend"
-version = "0.106.1"
+version = "0.107.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6cb918ee2c23939262efd1b99d76a21212ac7bd35129582133e21a22a6ff0467"
+checksum = "a07fd7393041d7faa2f37426f5dc7fc04003b70988810e8c063beefeff1cd8f9"
dependencies = [
"cranelift-codegen",
"log",
@@ -2804,15 +2822,15 @@ dependencies = [
[[package]]
name = "cranelift-isle"
-version = "0.106.1"
+version = "0.107.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "966e4cfb23cf6d7f1d285d53a912baaffc5f06bcd9c9b0a2d8c66a184fae534b"
+checksum = "f341d7938caa6dff8149dac05bb2b53fc680323826b83b4cf175ab9f5139a3c9"
[[package]]
name = "cranelift-native"
-version = "0.106.1"
+version = "0.107.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bea803aadfc4aabdfae7c3870f1b1f6dd4332f4091859e9758ef5fca6bf8cc87"
+checksum = "82af6066e6448d26eeabb7aa26a43f7ff79f8217b06bade4ee6ef230aecc8880"
dependencies = [
"cranelift-codegen",
"libc",
@@ -2821,9 +2839,9 @@ dependencies = [
[[package]]
name = "cranelift-wasm"
-version = "0.106.1"
+version = "0.107.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11d18a3572cd897555bba3621e568029417d8f5cc26aeede2d7cb0bad6afd916"
+checksum = "2766fab7284a914a7f17f90ebe865c86453225fb8637ac31f123f5028fee69cd"
dependencies = [
"cranelift-codegen",
"cranelift-entity",
@@ -5478,9 +5496,9 @@ dependencies = [
[[package]]
name = "ginepro"
-version = "0.7.0"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eedbff62a689be48f58f32571dbf3d60c4a73b39740141dfe7ac942536ea27f7"
+checksum = "3b00ef897d4082727a53ea1111cd19bfa4ccdc476a5eb9f49087047113a43891"
dependencies = [
"anyhow",
"async-trait",
@@ -6937,20 +6955,11 @@ dependencies = [
"pkg-config",
]
-[[package]]
-name = "mach"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa"
-dependencies = [
- "libc",
-]
-
[[package]]
name = "mach2"
-version = "0.4.1"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d0d1830bcd151a6fc4aea1369af235b36c1528fe976b8ff678683c9995eade8"
+checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709"
dependencies = [
"libc",
]
@@ -7756,6 +7765,15 @@ name = "object"
version = "0.32.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "object"
+version = "0.33.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8dd6c0cdf9429bce006e1362bfce61fa1bfd8c898a643ed8d2b471934701d3d"
dependencies = [
"crc32fast",
"hashbrown 0.14.3",
@@ -9306,9 +9324,9 @@ dependencies = [
[[package]]
name = "pyo3"
-version = "0.20.3"
+version = "0.21.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53bdbb96d49157e65d45cc287af5f32ffadd5f4761438b527b055fb0d4bb8233"
+checksum = "a5e00b96a521718e08e03b1a622f01c8a8deb50719335de3f60b3b3950f069d8"
dependencies = [
"cfg-if",
"indoc",
@@ -9324,9 +9342,9 @@ dependencies = [
[[package]]
name = "pyo3-build-config"
-version = "0.20.3"
+version = "0.21.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "deaa5745de3f5231ce10517a1f5dd97d53e5a2fd77aa6b5842292085831d48d7"
+checksum = "7883df5835fafdad87c0d888b266c8ec0f4c9ca48a5bed6bbb592e8dedee1b50"
dependencies = [
"once_cell",
"target-lexicon",
@@ -9334,9 +9352,9 @@ dependencies = [
[[package]]
name = "pyo3-ffi"
-version = "0.20.3"
+version = "0.21.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62b42531d03e08d4ef1f6e85a2ed422eb678b8cd62b762e53891c05faf0d4afa"
+checksum = "01be5843dc60b916ab4dad1dca6d20b9b4e6ddc8e15f50c47fe6d85f1fb97403"
dependencies = [
"libc",
"pyo3-build-config",
@@ -9344,9 +9362,9 @@ dependencies = [
[[package]]
name = "pyo3-macros"
-version = "0.20.3"
+version = "0.21.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7305c720fa01b8055ec95e484a6eca7a83c841267f0dd5280f0c8b8551d2c158"
+checksum = "77b34069fc0682e11b31dbd10321cbf94808394c56fd996796ce45217dfac53c"
dependencies = [
"proc-macro2",
"pyo3-macros-backend",
@@ -9356,9 +9374,9 @@ dependencies = [
[[package]]
name = "pyo3-macros-backend"
-version = "0.20.3"
+version = "0.21.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c7e9b68bb9c3149c5b0cade5d07f953d6d125eb4337723c4ccdb665f1f96185"
+checksum = "08260721f32db5e1a5beae69a55553f56b99bd0e1c3e6e0a5e8851a9d0f5a85c"
dependencies = [
"heck 0.4.1",
"proc-macro2",
@@ -10656,7 +10674,9 @@ version = "1.9.0-alpha"
dependencies = [
"anyhow",
"arrow-array 50.0.0",
+ "arrow-flight",
"arrow-schema 50.0.0",
+ "arrow-udf-flight",
"arrow-udf-js",
"arrow-udf-js-deno",
"arrow-udf-python",
@@ -10676,6 +10696,7 @@ dependencies = [
"futures",
"futures-async-stream",
"futures-util",
+ "ginepro",
"itertools 0.12.1",
"linkme",
"madsim-tokio",
@@ -10685,15 +10706,16 @@ dependencies = [
"openssl",
"parse-display",
"paste",
+ "prometheus",
"risingwave_common",
"risingwave_common_estimate_size",
"risingwave_expr_macro",
"risingwave_pb",
- "risingwave_udf",
"smallvec",
"static_assertions",
"thiserror",
"thiserror-ext",
+ "tonic 0.10.2",
"tracing",
"workspace-hack",
"zstd 0.13.0",
@@ -10759,6 +10781,7 @@ dependencies = [
"anyhow",
"arc-swap",
"arrow-schema 50.0.0",
+ "arrow-udf-flight",
"arrow-udf-wasm",
"assert_matches",
"async-recursion",
@@ -10818,7 +10841,6 @@ dependencies = [
"risingwave_rpc_client",
"risingwave_sqlparser",
"risingwave_storage",
- "risingwave_udf",
"risingwave_variables",
"rw_futures_util",
"serde",
@@ -11588,28 +11610,6 @@ dependencies = [
"workspace-hack",
]
-[[package]]
-name = "risingwave_udf"
-version = "0.1.0"
-dependencies = [
- "arrow-array 50.0.0",
- "arrow-flight",
- "arrow-schema 50.0.0",
- "arrow-select 50.0.0",
- "cfg-or-panic",
- "futures",
- "futures-util",
- "ginepro",
- "madsim-tokio",
- "madsim-tonic",
- "prometheus",
- "risingwave_common",
- "static_assertions",
- "thiserror",
- "thiserror-ext",
- "tracing",
-]
-
[[package]]
name = "risingwave_variables"
version = "1.9.0-alpha"
@@ -15308,9 +15308,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasi-common"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b53dfacdeacca15ee2a48a4aa0ec6a6d0da737676e465770c0585f79c04e638"
+checksum = "63255d85e10627b07325d7cf4e5fe5a40fa4ff183569a0a67931be26d50ede07"
dependencies = [
"anyhow",
"bitflags 2.5.0",
@@ -15406,9 +15406,18 @@ checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
[[package]]
name = "wasm-encoder"
-version = "0.201.0"
+version = "0.202.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9c7d2731df60006819b013f64ccc2019691deccf6e11a1804bc850cd6748f1a"
+checksum = "bfd106365a7f5f7aa3c1916a98cbb3ad477f5ff96ddb130285a91c6e7429e67a"
+dependencies = [
+ "leb128",
+]
+
+[[package]]
+name = "wasm-encoder"
+version = "0.206.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d759312e1137f199096d80a70be685899cd7d3d09c572836bb2e9b69b4dc3b1e"
dependencies = [
"leb128",
]
@@ -15441,9 +15450,9 @@ dependencies = [
[[package]]
name = "wasmparser"
-version = "0.201.0"
+version = "0.202.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "84e5df6dba6c0d7fafc63a450f1738451ed7a0b52295d83e868218fa286bf708"
+checksum = "d6998515d3cf3f8b980ef7c11b29a9b1017d4cf86b99ae93b546992df9931413"
dependencies = [
"bitflags 2.5.0",
"indexmap 2.0.0",
@@ -15452,9 +15461,9 @@ dependencies = [
[[package]]
name = "wasmprinter"
-version = "0.201.0"
+version = "0.202.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a67e66da702706ba08729a78e3c0079085f6bfcb1a62e4799e97bbf728c2c265"
+checksum = "ab1cc9508685eef9502e787f4d4123745f5651a1e29aec047645d3cac1e2da7a"
dependencies = [
"anyhow",
"wasmparser",
@@ -15462,9 +15471,9 @@ dependencies = [
[[package]]
name = "wasmtime"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "516be5b58a8f75d39b01378516dcb0ff7b9bc39c7f1f10eec5b338d4916cf988"
+checksum = "5a5990663c28d81015ddbb02a068ac1bf396a4ea296eba7125b2dfc7c00cb52e"
dependencies = [
"addr2line",
"anyhow",
@@ -15479,7 +15488,7 @@ dependencies = [
"ittapi",
"libc",
"log",
- "object",
+ "object 0.33.0",
"once_cell",
"paste",
"rayon",
@@ -15489,7 +15498,7 @@ dependencies = [
"serde_derive",
"serde_json",
"target-lexicon",
- "wasm-encoder",
+ "wasm-encoder 0.202.0",
"wasmparser",
"wasmtime-cache",
"wasmtime-component-macro",
@@ -15508,18 +15517,18 @@ dependencies = [
[[package]]
name = "wasmtime-asm-macros"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e8d22d88a92d69385f18143c946884bf6aaa9ec206ce54c85a2d320c1362b009"
+checksum = "625ee94c72004f3ea0228989c9506596e469517d7d0ed66f7300d1067bdf1ca9"
dependencies = [
"cfg-if",
]
[[package]]
name = "wasmtime-cache"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "068728a840223b56c964507550da671372e7e5c2f3a7856012b57482e3e979a7"
+checksum = "98534bf28de232299e83eab33984a7a6c40c69534d6bd0ea216150b63d41a83a"
dependencies = [
"anyhow",
"base64 0.21.7",
@@ -15537,9 +15546,9 @@ dependencies = [
[[package]]
name = "wasmtime-component-macro"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "631244bac89c57ebe7283209d86fe175ad5929328e75f61bf9141895cafbf52d"
+checksum = "64f84414a25ee3a624c8b77550f3fe7b5d8145bd3405ca58886ee6900abb6dc2"
dependencies = [
"anyhow",
"proc-macro2",
@@ -15552,15 +15561,15 @@ dependencies = [
[[package]]
name = "wasmtime-component-util"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82ad496ba0558f7602da5e9d4c201f35f7aefcca70f973ec916f3f0d0787ef74"
+checksum = "78580bdb4e04c7da3bf98088559ca1d29382668536e4d5c7f2f966d79c390307"
[[package]]
name = "wasmtime-cranelift"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "961ab5ee4b17e627001b18069ee89ef906edbbd3f84955515f6aad5ab6d82299"
+checksum = "b60df0ee08c6a536c765f69e9e8205273435b66d02dd401e938769a2622a6c1a"
dependencies = [
"anyhow",
"cfg-if",
@@ -15572,36 +15581,19 @@ dependencies = [
"cranelift-wasm",
"gimli",
"log",
- "object",
+ "object 0.33.0",
"target-lexicon",
"thiserror",
"wasmparser",
- "wasmtime-cranelift-shared",
"wasmtime-environ",
"wasmtime-versioned-export-macros",
]
-[[package]]
-name = "wasmtime-cranelift-shared"
-version = "19.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc4db94596be14cd1f85844ce85470bf68acf235143098b9d9bf72b49e47b917"
-dependencies = [
- "anyhow",
- "cranelift-codegen",
- "cranelift-control",
- "cranelift-native",
- "gimli",
- "object",
- "target-lexicon",
- "wasmtime-environ",
-]
-
[[package]]
name = "wasmtime-environ"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "420b13858ef27dfd116f1fdb0513e9593a307a632ade2ea58334b639a3d8d24e"
+checksum = "64ffc1613db69ee47c96738861534f9a405e422a5aa00224fbf5d410b03fb445"
dependencies = [
"anyhow",
"bincode 1.3.3",
@@ -15610,13 +15602,13 @@ dependencies = [
"gimli",
"indexmap 2.0.0",
"log",
- "object",
+ "object 0.33.0",
"rustc-demangle",
"serde",
"serde_derive",
"target-lexicon",
"thiserror",
- "wasm-encoder",
+ "wasm-encoder 0.202.0",
"wasmparser",
"wasmprinter",
"wasmtime-component-util",
@@ -15625,9 +15617,9 @@ dependencies = [
[[package]]
name = "wasmtime-fiber"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d37ff0e11a023019e34fe839c74a1c00880b989f4446176b6cc6da3b58e3ef2"
+checksum = "f043514a23792761c5765f8ba61a4aa7d67f260c0c37494caabceb41d8ae81de"
dependencies = [
"anyhow",
"cc",
@@ -15640,11 +15632,11 @@ dependencies = [
[[package]]
name = "wasmtime-jit-debug"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b849f19ad1d4a8133ff05b82c438144f17fb49b08e5f7995f8c1e25cf35f390"
+checksum = "9c0ca2ad8f5d2b37f507ef1c935687a690e84e9f325f5a2af9639440b43c1f0e"
dependencies = [
- "object",
+ "object 0.33.0",
"once_cell",
"rustix 0.38.31",
"wasmtime-versioned-export-macros",
@@ -15652,9 +15644,9 @@ dependencies = [
[[package]]
name = "wasmtime-jit-icache-coherence"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59c48eb4223d6556ffbf3decb146d0da124f1fd043f41c98b705252cb6a5c186"
+checksum = "7a9f93a3289057b26dc75eb84d6e60d7694f7d169c7c09597495de6e016a13ff"
dependencies = [
"cfg-if",
"libc",
@@ -15663,9 +15655,9 @@ dependencies = [
[[package]]
name = "wasmtime-runtime"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fefac2cb5f5a6f365234a3584bf40bd2e45e7f6cd90a689d9b2afbb9881978f"
+checksum = "c6332a2b0af4224c3ea57c857ad39acd2780ccc2b0c99ba1baa01864d90d7c94"
dependencies = [
"anyhow",
"cc",
@@ -15674,34 +15666,34 @@ dependencies = [
"indexmap 2.0.0",
"libc",
"log",
- "mach",
+ "mach2",
"memfd",
"memoffset",
"paste",
"psm",
"rustix 0.38.31",
"sptr",
- "wasm-encoder",
+ "wasm-encoder 0.202.0",
"wasmtime-asm-macros",
"wasmtime-environ",
"wasmtime-fiber",
"wasmtime-jit-debug",
+ "wasmtime-slab",
"wasmtime-versioned-export-macros",
- "wasmtime-wmemcheck",
"windows-sys 0.52.0",
]
[[package]]
name = "wasmtime-slab"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52d7b97b92df126fdbe994a53d2215828ec5ed5087535e6d4703b1fbd299f0e3"
+checksum = "8b3655075824a374c536a2b2cc9283bb765fcdf3d58b58587862c48571ad81ef"
[[package]]
name = "wasmtime-types"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "509c88abb830819b259c49e2d4e4f22b555db066ba08ded0b76b071a2aa53ddf"
+checksum = "b98cf64a242b0b9257604181ca28b28a5fcaa4c9ea1d396f76d1d2d1c5b40eef"
dependencies = [
"cranelift-entity",
"serde",
@@ -15712,9 +15704,9 @@ dependencies = [
[[package]]
name = "wasmtime-versioned-export-macros"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1d81c092a61ca1667013e2eb08fed7c6c53e496dbbaa32d5685dc5152b0a772"
+checksum = "8561d9e2920db2a175213d557d71c2ac7695831ab472bbfafb9060cd1034684f"
dependencies = [
"proc-macro2",
"quote",
@@ -15723,26 +15715,26 @@ dependencies = [
[[package]]
name = "wasmtime-winch"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0958907880e37a2d3974f5b3574c23bf70aaf1fc6c1f716625bb50dac776f1a"
+checksum = "a06b573d14ac846a0fb8c541d8fca6a64acf9a1d176176982472274ab1d2fa5d"
dependencies = [
"anyhow",
"cranelift-codegen",
"gimli",
- "object",
+ "object 0.33.0",
"target-lexicon",
"wasmparser",
- "wasmtime-cranelift-shared",
+ "wasmtime-cranelift",
"wasmtime-environ",
"winch-codegen",
]
[[package]]
name = "wasmtime-wit-bindgen"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a593ddefd2f80617df6bea084b2e422d8969e924bc209642a794d57518f59587"
+checksum = "595bc7bb3b0ff4aa00fab718c323ea552c3034d77abc821a35112552f2ea487a"
dependencies = [
"anyhow",
"heck 0.4.1",
@@ -15750,12 +15742,6 @@ dependencies = [
"wit-parser",
]
-[[package]]
-name = "wasmtime-wmemcheck"
-version = "19.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b77212b6874bbc86d220bb1d28632d0c11c6afe996c3e1ddcf746b1a6b4919b9"
-
[[package]]
name = "wast"
version = "35.0.2"
@@ -15767,24 +15753,24 @@ dependencies = [
[[package]]
name = "wast"
-version = "201.0.0"
+version = "206.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ef6e1ef34d7da3e2b374fd2b1a9c0227aff6cad596e1b24df9b58d0f6222faa"
+checksum = "68586953ee4960b1f5d84ebf26df3b628b17e6173bc088e0acfbce431469795a"
dependencies = [
"bumpalo",
"leb128",
"memchr",
"unicode-width",
- "wasm-encoder",
+ "wasm-encoder 0.206.0",
]
[[package]]
name = "wat"
-version = "1.201.0"
+version = "1.206.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "453d5b37a45b98dee4f4cb68015fc73634d7883bbef1c65e6e9c78d454cf3f32"
+checksum = "da4c6f2606276c6e991aebf441b2fc92c517807393f039992a3e0ad873efe4ad"
dependencies = [
- "wast 201.0.0",
+ "wast 206.0.0",
]
[[package]]
@@ -15872,9 +15858,9 @@ checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8"
[[package]]
name = "wiggle"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f093d8afdb09efaf2ed1037468bd4614308a762d215b6cafd60a7712993a8ffa"
+checksum = "1b6552dda951239e219c329e5a768393664e8d120c5e0818487ac2633f173b1f"
dependencies = [
"anyhow",
"async-trait",
@@ -15887,9 +15873,9 @@ dependencies = [
[[package]]
name = "wiggle-generate"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47c7bccd5172ce8d853242f723e42c84b8c131b24fb07a1570f9045d99258616"
+checksum = "da64cb31e0bfe8b1d2d13956ef9fd5c77545756a1a6ef0e6cfd44e8f1f207aed"
dependencies = [
"anyhow",
"heck 0.4.1",
@@ -15902,9 +15888,9 @@ dependencies = [
[[package]]
name = "wiggle-macro"
-version = "19.0.1"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a69d087dee85991096fc0c6eaf4dcf4e17cd16a0594c33b8ab9e2d345234ef75"
+checksum = "900b2416ef2ff2903ded6cf55d4a941fed601bf56a8c4874856d7a77c1891994"
dependencies = [
"proc-macro2",
"quote",
@@ -15945,9 +15931,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "winch-codegen"
-version = "0.17.1"
+version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e72a6a7034793b874b85e428fd6d7b3ccccb98c326e33af3aa40cdf50d0c33da"
+checksum = "fb23450977f9d4a23c02439cf6899340b2d68887b19465c5682740d9cc37d52e"
dependencies = [
"anyhow",
"cranelift-codegen",
@@ -15956,6 +15942,7 @@ dependencies = [
"smallvec",
"target-lexicon",
"wasmparser",
+ "wasmtime-cranelift",
"wasmtime-environ",
]
@@ -16244,9 +16231,9 @@ dependencies = [
[[package]]
name = "wit-parser"
-version = "0.201.0"
+version = "0.202.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "196d3ecfc4b759a8573bf86a9b3f8996b304b3732e4c7de81655f875f6efdca6"
+checksum = "744237b488352f4f27bca05a10acb79474415951c450e52ebd0da784c1df2bcc"
dependencies = [
"anyhow",
"id-arena",
diff --git a/Cargo.toml b/Cargo.toml
index 69b2988cf0a48..d75b5b75f741c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,7 +20,6 @@ members = [
"src/expr/core",
"src/expr/impl",
"src/expr/macro",
- "src/expr/udf",
"src/frontend",
"src/frontend/macro",
"src/frontend/planner_test",
@@ -139,10 +138,11 @@ arrow-flight = "50"
arrow-select = "50"
arrow-ord = "50"
arrow-row = "50"
-arrow-udf-js = "0.1"
-arrow-udf-js-deno = { git = "https://github.com/risingwavelabs/arrow-udf.git", rev = "23fe0dd" }
-arrow-udf-wasm = { version = "0.2.1", features = ["build"] }
-arrow-udf-python = { git = "https://github.com/risingwavelabs/arrow-udf.git", rev = "6c32f71" }
+arrow-udf-js = "0.2"
+arrow-udf-js-deno = { git = "https://github.com/risingwavelabs/arrow-udf.git", rev = "fa36365" }
+arrow-udf-wasm = { version = "0.2.2", features = ["build"] }
+arrow-udf-python = "0.1"
+arrow-udf-flight = "0.1"
arrow-array-deltalake = { package = "arrow-array", version = "48.0.1" }
arrow-buffer-deltalake = { package = "arrow-buffer", version = "48.0.1" }
arrow-cast-deltalake = { package = "arrow-cast", version = "48.0.1" }
diff --git a/ci/scripts/build-other.sh b/ci/scripts/build-other.sh
index 2311e5164fe74..65c50462f97a0 100755
--- a/ci/scripts/build-other.sh
+++ b/ci/scripts/build-other.sh
@@ -16,9 +16,13 @@ cd java
mvn -B package -Dmaven.test.skip=true
mvn -B install -Dmaven.test.skip=true --pl java-binding-integration-test --am
mvn dependency:copy-dependencies --no-transfer-progress --pl java-binding-integration-test
-mvn -B test --pl udf
cd ..
+echo "--- Build Java UDF"
+cd e2e_test/udf/java
+mvn -B package
+cd ../../..
+
echo "--- Build rust binary for java binding integration test"
cargo build -p risingwave_java_binding --bin data-chunk-payload-generator --bin data-chunk-payload-convert-generator
@@ -30,9 +34,9 @@ tar --zstd -cf java-binding-integration-test.tar.zst bin java/java-binding-integ
echo "--- Upload Java artifacts"
cp java/connector-node/assembly/target/risingwave-connector-1.0.0.tar.gz ./risingwave-connector.tar.gz
-cp java/udf-example/target/risingwave-udf-example.jar ./risingwave-udf-example.jar
+cp e2e_test/udf/java/target/risingwave-udf-example.jar ./udf.jar
cp e2e_test/udf/wasm/target/wasm32-wasi/release/udf.wasm udf.wasm
buildkite-agent artifact upload ./risingwave-connector.tar.gz
-buildkite-agent artifact upload ./risingwave-udf-example.jar
buildkite-agent artifact upload ./java-binding-integration-test.tar.zst
+buildkite-agent artifact upload ./udf.jar
buildkite-agent artifact upload ./udf.wasm
diff --git a/ci/scripts/run-e2e-test.sh b/ci/scripts/run-e2e-test.sh
index 5ce0b55f27e9e..044193b712724 100755
--- a/ci/scripts/run-e2e-test.sh
+++ b/ci/scripts/run-e2e-test.sh
@@ -70,7 +70,7 @@ download-and-decompress-artifact e2e_test_generated ./
download-and-decompress-artifact risingwave_e2e_extended_mode_test-"$profile" target/debug/
mkdir -p e2e_test/udf/wasm/target/wasm32-wasi/release/
buildkite-agent artifact download udf.wasm e2e_test/udf/wasm/target/wasm32-wasi/release/
-buildkite-agent artifact download risingwave-udf-example.jar ./
+buildkite-agent artifact download udf.jar ./
mv target/debug/risingwave_e2e_extended_mode_test-"$profile" target/debug/risingwave_e2e_extended_mode_test
chmod +x ./target/debug/risingwave_e2e_extended_mode_test
@@ -105,6 +105,7 @@ echo "--- e2e, $mode, Apache Superset"
sqllogictest -p 4566 -d dev './e2e_test/superset/*.slt' --junit "batch-${profile}"
echo "--- e2e, $mode, external python udf"
+python3 -m pip install --break-system-packages arrow-udf==0.2.1
python3 e2e_test/udf/test.py &
sleep 1
sqllogictest -p 4566 -d dev './e2e_test/udf/external_udf.slt'
@@ -117,7 +118,7 @@ sqllogictest -p 4566 -d dev './e2e_test/udf/always_retry_python.slt'
# sqllogictest -p 4566 -d dev './e2e_test/udf/retry_python.slt'
echo "--- e2e, $mode, external java udf"
-java -jar risingwave-udf-example.jar &
+java -jar udf.jar &
sleep 1
sqllogictest -p 4566 -d dev './e2e_test/udf/external_udf.slt'
pkill java
diff --git a/ci/scripts/run-unit-test.sh b/ci/scripts/run-unit-test.sh
index d9a723a34fa19..394cdb1a78261 100755
--- a/ci/scripts/run-unit-test.sh
+++ b/ci/scripts/run-unit-test.sh
@@ -5,11 +5,6 @@ set -euo pipefail
REPO_ROOT=${PWD}
-echo "+++ Run python UDF SDK unit tests"
-cd "${REPO_ROOT}"/src/expr/udf/python
-python3 -m pytest
-cd "${REPO_ROOT}"
-
echo "+++ Run unit tests"
# use tee to disable progress bar
NEXTEST_PROFILE=ci cargo nextest run --features failpoints,sync_point --workspace --exclude risingwave_simulation
diff --git a/e2e_test/error_ui/simple/main.slt b/e2e_test/error_ui/simple/main.slt
index 8ef82e1f0d1c7..6bcbbde608cf8 100644
--- a/e2e_test/error_ui/simple/main.slt
+++ b/e2e_test/error_ui/simple/main.slt
@@ -13,8 +13,10 @@ create function int_42() returns int as int_42 using link '555.0.0.1:8815';
----
db error: ERROR: Failed to run the query
-Caused by:
- Flight service error: invalid address: 555.0.0.1:8815, err: failed to parse address: http://555.0.0.1:8815: invalid IPv4 address
+Caused by these errors (recent errors listed first):
+ 1: Expr error
+ 2: UDF error
+ 3: Flight service error: invalid address: 555.0.0.1:8815, err: failed to parse address: http://555.0.0.1:8815: invalid IPv4 address
statement error
diff --git a/e2e_test/udf/external_udf.slt b/e2e_test/udf/external_udf.slt
index 096a605709d67..7a38506f81563 100644
--- a/e2e_test/udf/external_udf.slt
+++ b/e2e_test/udf/external_udf.slt
@@ -1,7 +1,7 @@
# Before running this test:
# python3 e2e_test/udf/test.py
# or:
-# cd java/udf-example && mvn package && java -jar target/risingwave-udf-example.jar
+# cd e2e_test/udf/java && mvn package && java -jar target/risingwave-udf-example.jar
# Create a function.
statement ok
diff --git a/java/udf-example/README.md b/e2e_test/udf/java/README.md
similarity index 100%
rename from java/udf-example/README.md
rename to e2e_test/udf/java/README.md
diff --git a/java/udf-example/pom.xml b/e2e_test/udf/java/pom.xml
similarity index 86%
rename from java/udf-example/pom.xml
rename to e2e_test/udf/java/pom.xml
index 8bf51cd108128..7ecd7c54dca17 100644
--- a/java/udf-example/pom.xml
+++ b/e2e_test/udf/java/pom.xml
@@ -5,17 +5,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
-
-
- com.risingwave
- risingwave-java-root
- 0.1.0-SNAPSHOT
- ../pom.xml
-
-
com.risingwaverisingwave-udf-example
- 0.1.1-SNAPSHOT
+ 0.1.0-SNAPSHOTudf-examplehttps://docs.risingwave.com/docs/current/udf-java
@@ -31,7 +23,7 @@
com.risingwaverisingwave-udf
- 0.1.3-SNAPSHOT
+ 0.2.0com.google.code.gson
diff --git a/java/udf-example/src/main/java/com/example/UdfExample.java b/e2e_test/udf/java/src/main/java/com/example/UdfExample.java
similarity index 99%
rename from java/udf-example/src/main/java/com/example/UdfExample.java
rename to e2e_test/udf/java/src/main/java/com/example/UdfExample.java
index 883dc5035514c..1702e244bf1ff 100644
--- a/java/udf-example/src/main/java/com/example/UdfExample.java
+++ b/e2e_test/udf/java/src/main/java/com/example/UdfExample.java
@@ -33,7 +33,7 @@
public class UdfExample {
public static void main(String[] args) throws IOException {
- try (var server = new UdfServer("0.0.0.0", 8815)) {
+ try (var server = new UdfServer("localhost", 8815)) {
server.addFunction("int_42", new Int42());
server.addFunction("float_to_decimal", new FloatToDecimal());
server.addFunction("sleep", new Sleep());
diff --git a/e2e_test/udf/requirements.txt b/e2e_test/udf/requirements.txt
index 8642e2b1ec254..36688db1ed1ee 100644
--- a/e2e_test/udf/requirements.txt
+++ b/e2e_test/udf/requirements.txt
@@ -1,2 +1,3 @@
flask
-waitress
\ No newline at end of file
+waitress
+arrow_udf==0.2.1
\ No newline at end of file
diff --git a/e2e_test/udf/test.py b/e2e_test/udf/test.py
index 6195476a80004..4443a81a6e74d 100644
--- a/e2e_test/udf/test.py
+++ b/e2e_test/udf/test.py
@@ -19,9 +19,7 @@
from typing import Iterator, List, Optional, Tuple, Any
from decimal import Decimal
-sys.path.append("src/expr/udf/python") # noqa
-
-from risingwave.udf import udf, udtf, UdfServer
+from arrow_udf import udf, udtf, UdfServer
@udf(input_types=[], result_type="INT")
@@ -47,13 +45,21 @@ def gcd3(x: int, y: int, z: int) -> int:
return gcd(gcd(x, y), z)
-@udf(input_types=["BYTEA"], result_type="STRUCT")
+@udf(
+ input_types=["BYTEA"],
+ result_type="STRUCT",
+)
def extract_tcp_info(tcp_packet: bytes):
src_addr, dst_addr = struct.unpack("!4s4s", tcp_packet[12:20])
src_port, dst_port = struct.unpack("!HH", tcp_packet[20:24])
src_addr = socket.inet_ntoa(src_addr)
dst_addr = socket.inet_ntoa(dst_addr)
- return src_addr, dst_addr, src_port, dst_port
+ return {
+ "src_addr": src_addr,
+ "dst_addr": dst_addr,
+ "src_port": src_port,
+ "dst_port": dst_port,
+ }
@udtf(input_types="INT", result_types="INT")
@@ -84,7 +90,7 @@ def hex_to_dec(hex: Optional[str]) -> Optional[Decimal]:
return dec
-@udf(input_types=["FLOAT8"], result_type="DECIMAL")
+@udf(input_types=["FLOAT64"], result_type="DECIMAL")
def float_to_decimal(f: float) -> Decimal:
return Decimal(f)
@@ -120,21 +126,49 @@ def jsonb_array_identity(list: List[Any]) -> List[Any]:
return list
-@udf(input_types="STRUCT", result_type="STRUCT")
+@udf(
+ input_types="STRUCT",
+ result_type="STRUCT",
+)
def jsonb_array_struct_identity(v: Tuple[List[Any], int]) -> Tuple[List[Any], int]:
return v
-ALL_TYPES = "BOOLEAN,SMALLINT,INT,BIGINT,FLOAT4,FLOAT8,DECIMAL,DATE,TIME,TIMESTAMP,INTERVAL,VARCHAR,BYTEA,JSONB".split(
- ","
-) + [
- "STRUCT"
-]
-
-
@udf(
- input_types=ALL_TYPES,
- result_type=f"struct<{','.join(ALL_TYPES)}>",
+ input_types=[
+ "boolean",
+ "int16",
+ "int32",
+ "int64",
+ "float32",
+ "float64",
+ "decimal",
+ "date32",
+ "time64",
+ "timestamp",
+ "interval",
+ "string",
+ "binary",
+ "json",
+ "struct",
+ ],
+ result_type="""struct<
+ boolean: boolean,
+ int16: int16,
+ int32: int32,
+ int64: int64,
+ float32: float32,
+ float64: float64,
+ decimal: decimal,
+ date32: date32,
+ time64: time64,
+ timestamp: timestamp,
+ interval: interval,
+ string: string,
+ binary: binary,
+ json: json,
+ struct: struct,
+ >""",
)
def return_all(
bool,
@@ -153,28 +187,60 @@ def return_all(
jsonb,
struct,
):
- return (
- bool,
- i16,
- i32,
- i64,
- f32,
- f64,
- decimal,
- date,
- time,
- timestamp,
- interval,
- varchar,
- bytea,
- jsonb,
- struct,
- )
+ return {
+ "boolean": bool,
+ "int16": i16,
+ "int32": i32,
+ "int64": i64,
+ "float32": f32,
+ "float64": f64,
+ "decimal": decimal,
+ "date32": date,
+ "time64": time,
+ "timestamp": timestamp,
+ "interval": interval,
+ "string": varchar,
+ "binary": bytea,
+ "json": jsonb,
+ "struct": struct,
+ }
@udf(
- input_types=[t + "[]" for t in ALL_TYPES],
- result_type=f"struct<{','.join(t + '[]' for t in ALL_TYPES)}>",
+ input_types=[
+ "boolean[]",
+ "int16[]",
+ "int32[]",
+ "int64[]",
+ "float32[]",
+ "float64[]",
+ "decimal[]",
+ "date32[]",
+ "time64[]",
+ "timestamp[]",
+ "interval[]",
+ "string[]",
+ "binary[]",
+ "json[]",
+ "struct[]",
+ ],
+ result_type="""struct<
+ boolean: boolean[],
+ int16: int16[],
+ int32: int32[],
+ int64: int64[],
+ float32: float32[],
+ float64: float64[],
+ decimal: decimal[],
+ date32: date32[],
+ time64: time64[],
+ timestamp: timestamp[],
+ interval: interval[],
+ string: string[],
+ binary: binary[],
+ json: json[],
+ struct: struct[],
+ >""",
)
def return_all_arrays(
bool,
@@ -193,23 +259,23 @@ def return_all_arrays(
jsonb,
struct,
):
- return (
- bool,
- i16,
- i32,
- i64,
- f32,
- f64,
- decimal,
- date,
- time,
- timestamp,
- interval,
- varchar,
- bytea,
- jsonb,
- struct,
- )
+ return {
+ "boolean": bool,
+ "int16": i16,
+ "int32": i32,
+ "int64": i64,
+ "float32": f32,
+ "float64": f64,
+ "decimal": decimal,
+ "date32": date,
+ "time64": time,
+ "timestamp": timestamp,
+ "interval": interval,
+ "string": varchar,
+ "binary": bytea,
+ "json": jsonb,
+ "struct": struct,
+ }
if __name__ == "__main__":
diff --git a/e2e_test/udf/wasm/Cargo.toml b/e2e_test/udf/wasm/Cargo.toml
index 250bd8132ca53..54c7da45b1af8 100644
--- a/e2e_test/udf/wasm/Cargo.toml
+++ b/e2e_test/udf/wasm/Cargo.toml
@@ -8,7 +8,7 @@ edition = "2021"
crate-type = ["cdylib"]
[dependencies]
-arrow-udf = "0.2"
+arrow-udf = "0.3"
genawaiter = "0.99"
rust_decimal = "1"
serde_json = "1"
diff --git a/java/dev.md b/java/dev.md
index ac20c30fe69fa..148fde173baad 100644
--- a/java/dev.md
+++ b/java/dev.md
@@ -56,9 +56,3 @@ Config with the following. It may work.
"java.format.settings.profile": "Android"
}
```
-
-## Deploy UDF Library to Maven
-
-```sh
-mvn clean deploy --pl udf --am
-```
\ No newline at end of file
diff --git a/java/pom.xml b/java/pom.xml
index 922c62ead69e5..f1ee457ef3b84 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -37,8 +37,6 @@
proto
- udf
- udf-examplejava-bindingcommon-utilsjava-binding-integration-test
@@ -572,4 +570,4 @@
https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
-
+
\ No newline at end of file
diff --git a/java/udf/CHANGELOG.md b/java/udf/CHANGELOG.md
deleted file mode 100644
index fb1f055783225..0000000000000
--- a/java/udf/CHANGELOG.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# Changelog
-
-All notable changes to this project will be documented in this file.
-
-The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
-and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-
-## [Unreleased]
-
-## [0.1.3] - 2023-12-06
-
-### Fixed
-
-- Fix decimal type output.
-
-## [0.1.2] - 2023-12-04
-
-### Fixed
-
-- Fix index-out-of-bound error when string or string list is large.
-- Fix memory leak.
-
-## [0.1.1] - 2023-12-03
-
-### Added
-
-- Support struct in struct and struct[] in struct.
-
-### Changed
-
-- Bump Arrow version to 14.
-
-### Fixed
-
-- Fix unconstrained decimal type.
-
-## [0.1.0] - 2023-09-01
-
-- Initial release.
\ No newline at end of file
diff --git a/java/udf/README.md b/java/udf/README.md
deleted file mode 100644
index 200b897b8b890..0000000000000
--- a/java/udf/README.md
+++ /dev/null
@@ -1,274 +0,0 @@
-# RisingWave Java UDF SDK
-
-This library provides a Java SDK for creating user-defined functions (UDF) in RisingWave.
-
-## Introduction
-
-RisingWave supports user-defined functions implemented as external functions.
-With the RisingWave Java UDF SDK, users can define custom UDFs using Java and start a Java process as a UDF server.
-RisingWave can then remotely access the UDF server to execute the defined functions.
-
-## Installation
-
-To install the RisingWave Java UDF SDK:
-
-```sh
-git clone https://github.com/risingwavelabs/risingwave.git
-cd risingwave/java/udf
-mvn install
-```
-
-Or you can add the following dependency to your `pom.xml` file:
-
-```xml
-
-
- com.risingwave
- risingwave-udf
- 0.1.0
-
-
-```
-
-
-## Creating a New Project
-
-> NOTE: You can also start from the [udf-example](../udf-example) project without creating the project from scratch.
-
-To create a new project using the RisingWave Java UDF SDK, follow these steps:
-
-```sh
-mvn archetype:generate -DgroupId=com.example -DartifactId=udf-example -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false
-```
-
-Configure your `pom.xml` file as follows:
-
-```xml
-
-
- 4.0.0
- com.example
- udf-example
- 1.0-SNAPSHOT
-
-
-
- com.risingwave
- risingwave-udf
- 0.1.0
-
-
-
-```
-
-The `--add-opens` flag must be added when running unit tests through Maven:
-
-```xml
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- 3.0.0
-
- --add-opens=java.base/java.nio=ALL-UNNAMED
-
-
-
-
-```
-
-## Scalar Functions
-
-A user-defined scalar function maps zero, one, or multiple scalar values to a new scalar value.
-
-In order to define a scalar function, one has to create a new class that implements the `ScalarFunction`
-interface in `com.risingwave.functions` and implement exactly one evaluation method named `eval(...)`.
-This method must be declared public and non-static.
-
-Any [data type](#data-types) listed in the data types section can be used as a parameter or return type of an evaluation method.
-
-Here's an example of a scalar function that calculates the greatest common divisor (GCD) of two integers:
-
-```java
-import com.risingwave.functions.ScalarFunction;
-
-public class Gcd implements ScalarFunction {
- public int eval(int a, int b) {
- while (b != 0) {
- int temp = b;
- b = a % b;
- a = temp;
- }
- return a;
- }
-}
-```
-
-> **NOTE:** Differences with Flink
-> 1. The `ScalarFunction` is an interface instead of an abstract class.
-> 2. Multiple overloaded `eval` methods are not supported.
-> 3. Variable arguments such as `eval(Integer...)` are not supported.
-
-## Table Functions
-
-A user-defined table function maps zero, one, or multiple scalar values to one or multiple
-rows (structured types).
-
-In order to define a table function, one has to create a new class that implements the `TableFunction`
-interface in `com.risingwave.functions` and implement exactly one evaluation method named `eval(...)`.
-This method must be declared public and non-static.
-
-The return type must be an `Iterator` of any [data type](#data-types) listed in the data types section.
-Similar to scalar functions, input and output data types are automatically extracted using reflection.
-This includes the generic argument T of the return value for determining an output data type.
-
-Here's an example of a table function that generates a series of integers:
-
-```java
-import com.risingwave.functions.TableFunction;
-
-public class Series implements TableFunction {
- public Iterator eval(int n) {
- return java.util.stream.IntStream.range(0, n).iterator();
- }
-}
-```
-
-> **NOTE:** Differences with Flink
-> 1. The `TableFunction` is an interface instead of an abstract class. It has no generic arguments.
-> 2. Instead of calling `collect` to emit a row, the `eval` method returns an `Iterator` of the output rows.
-> 3. Multiple overloaded `eval` methods are not supported.
-> 4. Variable arguments such as `eval(Integer...)` are not supported.
-> 5. In SQL, table functions can be used in the `FROM` clause directly. `JOIN LATERAL TABLE` is not supported.
-
-## UDF Server
-
-To create a UDF server and register functions:
-
-```java
-import com.risingwave.functions.UdfServer;
-
-public class App {
- public static void main(String[] args) {
- try (var server = new UdfServer("0.0.0.0", 8815)) {
- // register functions
- server.addFunction("gcd", new Gcd());
- server.addFunction("series", new Series());
- // start the server
- server.start();
- server.awaitTermination();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
-```
-
-To run the UDF server, execute the following command:
-
-```sh
-_JAVA_OPTIONS="--add-opens=java.base/java.nio=ALL-UNNAMED" mvn exec:java -Dexec.mainClass="com.example.App"
-```
-
-## Creating Functions in RisingWave
-
-```sql
-create function gcd(int, int) returns int
-as gcd using link 'http://localhost:8815';
-
-create function series(int) returns table (x int)
-as series using link 'http://localhost:8815';
-```
-
-For more detailed information and examples, please refer to the official RisingWave [documentation](https://www.risingwave.dev/docs/current/user-defined-functions/#4-declare-your-functions-in-risingwave).
-
-## Using Functions in RisingWave
-
-Once the user-defined functions are created in RisingWave, you can use them in SQL queries just like any built-in functions. Here are a few examples:
-
-```sql
-select gcd(25, 15);
-
-select * from series(10);
-```
-
-## Data Types
-
-The RisingWave Java UDF SDK supports the following data types:
-
-| SQL Type | Java Type | Notes |
-| ---------------- | --------------------------------------- | ------------------ |
-| BOOLEAN | boolean, Boolean | |
-| SMALLINT | short, Short | |
-| INT | int, Integer | |
-| BIGINT | long, Long | |
-| REAL | float, Float | |
-| DOUBLE PRECISION | double, Double | |
-| DECIMAL | BigDecimal | |
-| DATE | java.time.LocalDate | |
-| TIME | java.time.LocalTime | |
-| TIMESTAMP | java.time.LocalDateTime | |
-| INTERVAL | com.risingwave.functions.PeriodDuration | |
-| VARCHAR | String | |
-| BYTEA | byte[] | |
-| JSONB | String | Use `@DataTypeHint("JSONB") String` as the type. See [example](#jsonb). |
-| T[] | T'[] | `T` can be any of the above SQL types. `T'` should be the corresponding Java type.|
-| STRUCT<> | user-defined class | Define a data class as the type. See [example](#struct-type). |
-| ...others | | Not supported yet. |
-
-### JSONB
-
-```java
-import com.google.gson.Gson;
-
-// Returns the i-th element of a JSON array.
-public class JsonbAccess implements ScalarFunction {
- static Gson gson = new Gson();
-
- public @DataTypeHint("JSONB") String eval(@DataTypeHint("JSONB") String json, int index) {
- if (json == null)
- return null;
- var array = gson.fromJson(json, Object[].class);
- if (index >= array.length || index < 0)
- return null;
- var obj = array[index];
- return gson.toJson(obj);
- }
-}
-```
-
-```sql
-create function jsonb_access(jsonb, int) returns jsonb
-as jsonb_access using link 'http://localhost:8815';
-```
-
-### Struct Type
-
-```java
-// Split a socket address into host and port.
-public static class IpPort implements ScalarFunction {
- public static class SocketAddr {
- public String host;
- public short port;
- }
-
- public SocketAddr eval(String addr) {
- var socketAddr = new SocketAddr();
- var parts = addr.split(":");
- socketAddr.host = parts[0];
- socketAddr.port = Short.parseShort(parts[1]);
- return socketAddr;
- }
-}
-```
-
-```sql
-create function ip_port(varchar) returns struct
-as ip_port using link 'http://localhost:8815';
-```
-
-## Full Example
-
-You can checkout [udf-example](../udf-example) and use it as a template to create your own UDFs.
diff --git a/java/udf/pom.xml b/java/udf/pom.xml
deleted file mode 100644
index f747603ca8429..0000000000000
--- a/java/udf/pom.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
- 4.0.0
-
- com.risingwave
- risingwave-udf
- jar
- 0.1.3-SNAPSHOT
-
-
- risingwave-java-root
- com.risingwave
- 0.1.0-SNAPSHOT
- ../pom.xml
-
-
- RisingWave Java UDF SDK
- https://docs.risingwave.com/docs/current/udf-java
-
-
-
- org.junit.jupiter
- junit-jupiter-engine
- 5.9.1
- test
-
-
- org.apache.arrow
- arrow-vector
- 14.0.0
-
-
- org.apache.arrow
- flight-core
- 14.0.0
-
-
- org.slf4j
- slf4j-api
- 2.0.7
-
-
- org.slf4j
- slf4j-simple
- 2.0.7
-
-
-
-
-
- kr.motd.maven
- os-maven-plugin
- 1.7.0
-
-
-
-
\ No newline at end of file
diff --git a/java/udf/src/main/java/com/risingwave/functions/DataTypeHint.java b/java/udf/src/main/java/com/risingwave/functions/DataTypeHint.java
deleted file mode 100644
index 7baf0fe4c6115..0000000000000
--- a/java/udf/src/main/java/com/risingwave/functions/DataTypeHint.java
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2024 RisingWave Labs
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.risingwave.functions;
-
-import java.lang.annotation.*;
-
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER})
-public @interface DataTypeHint {
- String value();
-}
diff --git a/java/udf/src/main/java/com/risingwave/functions/PeriodDuration.java b/java/udf/src/main/java/com/risingwave/functions/PeriodDuration.java
deleted file mode 100644
index 6d704100f6f35..0000000000000
--- a/java/udf/src/main/java/com/risingwave/functions/PeriodDuration.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2024 RisingWave Labs
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.risingwave.functions;
-
-import java.time.Duration;
-import java.time.Period;
-
-/** Combination of Period and Duration. */
-public class PeriodDuration extends org.apache.arrow.vector.PeriodDuration {
- public PeriodDuration(Period period, Duration duration) {
- super(period, duration);
- }
-
- PeriodDuration(org.apache.arrow.vector.PeriodDuration base) {
- super(base.getPeriod(), base.getDuration());
- }
-}
diff --git a/java/udf/src/main/java/com/risingwave/functions/ScalarFunction.java b/java/udf/src/main/java/com/risingwave/functions/ScalarFunction.java
deleted file mode 100644
index 5f3fcaf287330..0000000000000
--- a/java/udf/src/main/java/com/risingwave/functions/ScalarFunction.java
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2024 RisingWave Labs
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.risingwave.functions;
-
-/**
- * Base interface for a user-defined scalar function. A user-defined scalar function maps zero, one,
- * or multiple scalar values to a new scalar value.
- *
- *
The behavior of a {@link ScalarFunction} can be defined by implementing a custom evaluation
- * method. An evaluation method must be declared publicly, not static, and named eval.
- * Multiple overloaded methods named eval are not supported yet.
- *
- *
By default, input and output data types are automatically extracted using reflection.
- *
- *
The following examples show how to specify a scalar function:
- *
- *
{@code
- * // a function that accepts two INT arguments and computes a sum
- * class SumFunction implements ScalarFunction {
- * public Integer eval(Integer a, Integer b) {
- * return a + b;
- * }
- * }
- *
- * // a function that returns a struct type
- * class StructFunction implements ScalarFunction {
- * public static class KeyValue {
- * public String key;
- * public int value;
- * }
- *
- * public KeyValue eval(int a) {
- * KeyValue kv = new KeyValue();
- * kv.key = a.toString();
- * kv.value = a;
- * return kv;
- * }
- * }
- * }
- */
-public interface ScalarFunction extends UserDefinedFunction {}
diff --git a/java/udf/src/main/java/com/risingwave/functions/ScalarFunctionBatch.java b/java/udf/src/main/java/com/risingwave/functions/ScalarFunctionBatch.java
deleted file mode 100644
index 5d837d3b370f9..0000000000000
--- a/java/udf/src/main/java/com/risingwave/functions/ScalarFunctionBatch.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2024 RisingWave Labs
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.risingwave.functions;
-
-import java.lang.invoke.MethodHandle;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.function.Function;
-import org.apache.arrow.memory.BufferAllocator;
-import org.apache.arrow.vector.VectorSchemaRoot;
-
-/** Batch-processing wrapper over a user-defined scalar function. */
-class ScalarFunctionBatch extends UserDefinedFunctionBatch {
- ScalarFunction function;
- MethodHandle methodHandle;
- Function