Presto 中的用户定义函数

编程入门 行业动态 更新时间:2024-10-26 22:28:57
本文介绍了Presto 中的用户定义函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我目前正在使用 Presto 0.80.我必须编写一个用户定义的函数来在选择查询期间将摄氏度转换为华氏度.我使用 Hive QL 做了同样的事情,但想知道我们是否可以在 Facebook Presto 中复制相同的内容.

I am currently working with Presto 0.80. I have to write a user defined function to convert degree celsius to degree fahrenheit during select query. I did the same using Hive QL but was wondering if we can replicate the same in Facebook Presto.

任何帮助将不胜感激.

谢谢!!

推荐答案

这是在 presto 中编写新函数的指南.trino.io/docs/current/develop/functions.html

Here is a guide for writing a new function in presto. trino.io/docs/current/develop/functions.html

编写函数后,将插件添加到 plugin 目录,如 SPI 概述.

After writing your function, add the plugin to the plugin directory as explained in SPI Overview.

Qubole 博客上还有一个写 presto UDF 的例子.www.qubole/blog/product/plugging-in-presto-udfs/如果你能成功,你可以试试.

There is another example for writing presto UDF from Qubole blog. www.qubole/blog/product/plugging-in-presto-udfs/ You can try it if you can make it work.

更多推荐

Presto 中的用户定义函数

本文发布于:2023-10-28 05:13:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1535627.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:函数   定义   用户   Presto

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!