We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


Commission custom User Defined Functions? — Vertica Forum

Commission custom User Defined Functions?

edited November 2022 in General Discussion

Is it ok to post a request for a custom Vertica User Defined Function as a paid freelance job?
If able and interested can contact me directly with questions/quote. I'll update this post when hired.

EDIT Revised request below to extend an Collection function

I'd like a function APPLY_VARIANCE() such that works similar to other Vertica Collection functions, but returns the sample variance.

E.g. SELECT APPLY_VARIANCE(ARRAY[1,2,3,4]); would return the sample variance, 1.666667

Reading the docs, it seems that these could be created as a scalar User Defined Functions in C++. While these functions are documented and I used to know C++ well in the past, it seems like it would be way faster and better to hire someone already experienced with writing UDFs in Vertica.

https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/ExtendingVertica/UDx/ScalarFunctions/ExampleC++.htm

Answers

  • HibikiHibiki Vertica Employee Employee

    @Pieter_Sheth-Vo Does the following query with EXPLODE work as the workaround?

    => SELECT variance(value) FROM (
    ->   SELECT explode(ARRAY[1, 2, 3, 4]) OVER(PARTITION BEST)
    -> ) a;
         variance
    ------------------
     1.66666666666667
    (1 row)
    
  • @Hibiki Yes! This was perfect. The EXPLODE and PARTITION functions are extremely deep.

  • VValdarVValdar Vertica Employee Employee

    Check the 12.0.4 patch note, we made some ease of use improvement for EXPLODE.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file