Skip to content

This UDF evaluates the input expression against a set of input values and outputs result as a boolean

Notifications You must be signed in to change notification settings

manojkumarvohra/Evaluator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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'

About

This UDF evaluates the input expression against a set of input values and outputs result as a boolean

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages