当前位置: 首页>>代码示例>>Java>>正文


Java GenericUDFOPEqualOrLessThan类代码示例

本文整理汇总了Java中org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPEqualOrLessThan的典型用法代码示例。如果您正苦于以下问题:Java GenericUDFOPEqualOrLessThan类的具体用法?Java GenericUDFOPEqualOrLessThan怎么用?Java GenericUDFOPEqualOrLessThan使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GenericUDFOPEqualOrLessThan类属于org.apache.hadoop.hive.ql.udf.generic包,在下文中一共展示了GenericUDFOPEqualOrLessThan类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getDataForSinglePredicate

import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPEqualOrLessThan; //导入依赖的package包/类
/**
 * Data provider for a predicate with single function.
 *
 * @return the require arguments: an expression node and respective null/non-null check
 * for the pushed predicate and residual predicate
 */
@DataProvider
private Object[][] getDataForSinglePredicate() {
  return new Object[][]{
    {getExprNodeDesc(TypeInfoFactory.intTypeInfo, "c1", 10, TypeInfoFactory.booleanTypeInfo,
      new GenericUDFOPEqual()), NullCheck.NotNull, NullCheck.Null,
      new SingleColumnValueFilter("c1", CompareOp.EQUAL, 10)},
    {getExprNodeDesc(TypeInfoFactory.intTypeInfo, "c1", 10, TypeInfoFactory.booleanTypeInfo,
      new GenericUDFOPLessThan()), NullCheck.NotNull, NullCheck.Null,
      new SingleColumnValueFilter("c1", CompareOp.LESS, 10)},
    {getExprNodeDesc(TypeInfoFactory.stringTypeInfo, "c1", "10", TypeInfoFactory.booleanTypeInfo,
      new GenericUDFOPEqual()), NullCheck.NotNull, NullCheck.Null,
      new SingleColumnValueFilter("c1", CompareOp.EQUAL, "10")},
    {getExprNodeDesc(TypeInfoFactory.intTypeInfo, "c1", 10, TypeInfoFactory.booleanTypeInfo,
      new GenericUDFOPEqualOrLessThan()), NullCheck.NotNull, NullCheck.Null,
      new SingleColumnValueFilter("c1", CompareOp.LESS_OR_EQUAL, "10")},
    {getExprNodeDesc(TypeInfoFactory.intTypeInfo, "c1", 10, TypeInfoFactory.booleanTypeInfo,
      new GenericUDFOPGreaterThan()), NullCheck.NotNull, NullCheck.Null,
      new SingleColumnValueFilter("c1", CompareOp.GREATER, 10)},
    {getExprNodeDesc(TypeInfoFactory.intTypeInfo, "c1", 10, TypeInfoFactory.booleanTypeInfo,
      new GenericUDFOPEqualOrGreaterThan()), NullCheck.NotNull, NullCheck.Null,
      new SingleColumnValueFilter("c1", CompareOp.GREATER_OR_EQUAL, 10)},
    {getExprNodeDesc(TypeInfoFactory.intTypeInfo, "c1", 10, TypeInfoFactory.booleanTypeInfo,
      new GenericUDFOPNotEqual()), NullCheck.NotNull, NullCheck.Null,
      new SingleColumnValueFilter("c1", CompareOp.NOT_EQUAL, 10)},
    {getExprNodeDesc(TypeInfoFactory.intTypeInfo, "c1", 10, TypeInfoFactory.booleanTypeInfo,
      new GenericUDFOPMultiply()), NullCheck.Null, NullCheck.NotNull,
      null
    }
  };
}
 
开发者ID:ampool,项目名称:monarch,代码行数:37,代码来源:MonarchPredicateHandlerTest.java

示例2: getPredicateAnalyzer

import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPEqualOrLessThan; //导入依赖的package包/类
public static IndexPredicateAnalyzer getPredicateAnalyzer() {

    IndexPredicateAnalyzer analyzer = new IndexPredicateAnalyzer();
    analyzer.addComparisonOp(GenericUDFOPEqual.class.getName());
    analyzer.addComparisonOp(GenericUDFOPGreaterThan.class.getName());
    analyzer.addComparisonOp(GenericUDFOPEqualOrGreaterThan.class.getName());
    analyzer.addComparisonOp(GenericUDFOPLessThan.class.getName());
    analyzer.addComparisonOp(GenericUDFOPEqualOrLessThan.class.getName());
    //TODO: Add support for LIKE operator.
    return analyzer;
  }
 
开发者ID:amitjaspal,项目名称:solr-storagehandler,代码行数:12,代码来源:PredicateAnalyzer.java

示例3: get

import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPEqualOrLessThan; //导入依赖的package包/类
public static IHiveExprNode get( final ExprNodeGenericFuncDesc exprNodeDesc , final GenericUDF udf , final List<ExprNodeDesc> childNodeDesc ){
  if( udf instanceof GenericUDFBridge ){
    return getFromUdfClassName( ( (GenericUDFBridge)udf ).getUdfClass() , childNodeDesc );
  }

  if( udf instanceof GenericUDFOPEqual ){
    return new EqualsHiveExpr( childNodeDesc );
  }
  else if( udf instanceof GenericUDFOPNotEqual ){
    return new NotEqualsHiveExpr( childNodeDesc );
  }
  else if( udf instanceof GenericUDFOPNotNull ){
    return new NotNullHiveExpr( childNodeDesc );
  }
  else if( udf instanceof GenericUDFIn ){
    return new InHiveExpr( childNodeDesc );
  }
  else if( udf instanceof GenericUDFBetween ){
    return new BetweenHiveExpr( childNodeDesc );
  }
  else if( udf instanceof GenericUDFOPNull ){
    return new NullHiveExpr( childNodeDesc );
  }
  else if( udf instanceof GenericUDFIndex ){
    return new BooleanHiveExpr( exprNodeDesc , (GenericUDFIndex)udf );
  }
  else if( udf instanceof GenericUDFOPEqualOrLessThan ){
    return new CompareHiveExpr( childNodeDesc , StringCompareFilterType.LE , NumberFilterType.LE );
  }
  else if( udf instanceof GenericUDFOPLessThan ){
    return new CompareHiveExpr( childNodeDesc , StringCompareFilterType.LT , NumberFilterType.LT );
  }
  else if( udf instanceof GenericUDFOPEqualOrGreaterThan ){
    return new CompareHiveExpr( childNodeDesc , StringCompareFilterType.GE , NumberFilterType.GE );
  }
  else if( udf instanceof GenericUDFOPGreaterThan ){
    return new CompareHiveExpr( childNodeDesc , StringCompareFilterType.GT , NumberFilterType.GT );
  }

  return new UnsupportHiveExpr();
}
 
开发者ID:yahoojapan,项目名称:multiple-dimension-spread,代码行数:42,代码来源:HiveExprFactory.java


注:本文中的org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPEqualOrLessThan类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。