GitXplorerGitXplorer
m

Evaluator

public
0 stars
0 forks
62 issues

Commits

List of commits on branch master.
Unverified
89501cae63343a6c9746c62087d1a6fb85db244e

Update README.md

mmanojkumarvohra committed 9 years ago
Unverified
b0415ca6397653c5a199a6980c2832fea5ce78dd

Create README.md

mmanojkumarvohra committed 9 years ago
Unverified
67f88c30636c7bb861cd68622b336167d5aad792

adding the expression evaluator UDF draft implementation

committed 9 years ago

README

The README file for this repository.

Evaluator

This UDF evaluates the input expression to a boolean


Usage

evaluate_to_boolean( expression, input0, input1, ....input-n)

Input indexing start from 0

Examples

hive> SELECT evaluate_to_boolean(':0*:2==:1',1,2,2);

true

hive> SELECT evaluate_to_boolean(':0 between :1 and :2',current_timestamp(),current_date(), current_timestamp());

true

hive> SELECT evaluate_to_boolean('((:3 != :4) AND (:0 between :1 and :2))',current_timestamp(),current_date(), current_timestamp(), 12,12);

false


Installation

  • checkout the repository
  • make the package
  • add the jar (without dependencies) to hive
  • create temporary/permanent function evaluate_to_boolean as 'com.bigdata.hive.udf.impl.BooleanExpressionEvaluatorUDF'