Code Monkey home page Code Monkey logo

facebook-hive-udfs's Introduction

Build & test with Maven

facebook-hive-udfs

Facebook's Hive UDFs

WHAT IT IS

A computer guy at Facebook dumped a bunch of UDFs/UDAFs here:

https://issues.apache.org/jira/browse/HIVE-1545

However, the code does not build and is missing many parts.

This is a partial copy of that code, except it builds and may (or may not) work. Use at your own risk. To build it:

mvn package

This will produce a jar in target/ which you can add to your Hive classpath.

Alternatively, you can use the published jar included with this repo's packages.

You can add this repository as a maven source with:

<project>
...
  <repositories>
    <repository>
      <id>github</id>
      <name>facebook-hive-udfs</name>
      <url>https://maven.pkg.github.com/brndnmtthws/facebook-hive-udfs</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
...
</project>

And then include it in your pom.xml:

<dependency>
  <groupId>com.airbnb</groupId>
  <artifactId>facebook-udfs</artifactId>
  <version>1.1.5</version>
</dependency>

HOW DO USE IT?

Like any other UDF, silly!

Here's a sample:

CREATE TEMPORARY FUNCTION md5 AS 'com.facebook.hive.udf.UDFMD5';
SELECT md5(password) from users limit 1;

cool!!

facebook-hive-udfs's People

Contributors

brndnmtthws avatar dependabot-preview[bot] avatar dependabot[bot] avatar nfultz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

facebook-hive-udfs's Issues

udfarrayexclude doesn't work

First execute command on hive cli:
CREATE TEMPORARY FUNCTION udfarrayexclude AS 'com.facebook.hive.udf.UDFArrayExclude';
SELECT udfarrayexclude(array(1,2,3),array(1,2))

The result is as follows:
hive> SELECT udfarrayexclude(array(1,2,3),array(1,2));
OK
[1,2,3]
Time taken: 4.858 seconds, Fetched: 1 row(s)

why? In my opinion, the result should be [3]

Could someone give me some help?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.