Tabnine Logo
ScriptTupleFunction.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
cascading.operation.expression.ScriptTupleFunction
constructor

Best Java code snippets using cascading.operation.expression.ScriptTupleFunction.<init> (Showing top 5 results out of 315)

origin: cascading/lingual-core

private static Pipe addFunction( RelOptCluster cluster, RexProgram program, Pipe pipe )
 {
 final Fields incomingFields = createTypedFields( cluster, program.getInputRowType(), false );
 BlockBuilder statements = new BlockBuilder();
 List<Expression> expressionList = RexToLixTranslator.translateProjects(
  program,
  (JavaTypeFactory) cluster.getTypeFactory(),
  statements,
  new RexToLixTranslator.InputGetter()
  {
  public Expression field( BlockBuilder list, int index )
   {
   final Type type = incomingFields.getType( index );
   final String name = incomingFields.get( index ).toString();
   return Expressions.parameter( type, name );
   }
  } );
 Expression record = Expressions.newArrayInit( Object.class, expressionList );
 record = Expressions.new_( getConstructor(), record );
 statements.add( Expressions.return_( null, record ) );
 BlockStatement block = statements.toBlock();
 String expression = Expressions.toString( block );
 Fields outgoingFields = createTypedFields( cluster, program.getOutputRowType(), false );
 LOG.debug( "function parameters: {}", program.getInputRowType() );
 LOG.debug( "function results: {}", outgoingFields );
 LOG.debug( "function expression: {}", expression );
 Function scriptFunction = new ScriptTupleFunction( outgoingFields, expression, incomingFields.getTypesClasses() );
 return new Each( pipe, scriptFunction, Fields.RESULTS );
 }
origin: cascading/cascading-expression

private Object evaluate( String expression, Class returnType, TupleEntry tupleEntry )
 {
 ScriptTupleFunction function = new ScriptTupleFunction( new Fields( "result", returnType ), expression );
 ConcreteCall<ExpressionOperation.Context> call = new ConcreteCall<ExpressionOperation.Context>( tupleEntry.getFields(), function.getFieldDeclaration() );
 function.prepare( FlowProcess.NULL, call );
 return function.evaluate( call.getContext(), tupleEntry );
 }
origin: cwensel/cascading

private Object evaluate( String expression, String[] names, Class[] types, TupleEntry tupleEntry )
 {
 ScriptTupleFunction function = new ScriptTupleFunction( new Fields( "result" ), expression, names, types );
 ConcreteCall<ExpressionOperation.Context> call = new ConcreteCall<ExpressionOperation.Context>( tupleEntry.getFields(), function.getFieldDeclaration() );
 function.prepare( FlowProcess.NULL, call );
 return function.evaluate( call.getContext(), tupleEntry );
 }
origin: cwensel/cascading

private Object evaluate( String expression, Class returnType, TupleEntry tupleEntry )
 {
 ScriptTupleFunction function = new ScriptTupleFunction( new Fields( "result", returnType ), expression );
 ConcreteCall<ExpressionOperation.Context> call = new ConcreteCall<ExpressionOperation.Context>( tupleEntry.getFields(), function.getFieldDeclaration() );
 function.prepare( FlowProcess.NULL, call );
 return function.evaluate( call.getContext(), tupleEntry );
 }
origin: cascading/cascading-expression

private Object evaluate( String expression, String[] names, Class[] types, TupleEntry tupleEntry )
 {
 ScriptTupleFunction function = new ScriptTupleFunction( new Fields( "result" ), expression, names, types );
 ConcreteCall<ExpressionOperation.Context> call = new ConcreteCall<ExpressionOperation.Context>( tupleEntry.getFields(), function.getFieldDeclaration() );
 function.prepare( FlowProcess.NULL, call );
 return function.evaluate( call.getContext(), tupleEntry );
 }
cascading.operation.expressionScriptTupleFunction<init>

Javadoc

Constructor ScriptFunction creates a new ScriptFunction instance.

This constructor will use the runtime cascading.operation.OperationCall#getArgumentFields()to source the parameterNames and parameterTypes required by the other constructors.

The returnType will be retrieved from the given fieldDeclaration.getTypeClass(0).

Popular methods of ScriptTupleFunction

  • evaluate
  • getBlock
  • getFieldDeclaration
  • prepare

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now