Tabnine Logo
StdUDF.getAndCheckNullableArguments
Code IndexAdd Tabnine to your IDE (free)

How to use
getAndCheckNullableArguments
method
in
com.linkedin.transport.api.udf.StdUDF

Best Java code snippets using com.linkedin.transport.api.udf.StdUDF.getAndCheckNullableArguments (Showing top 9 results out of 315)

origin: com.linkedin.transport/transportable-udfs-hive

@Override
public void copyToNewInstance(Object newInstance) throws UDFArgumentException {
 super.copyToNewInstance(newInstance);
 if (_stdUdf == null) {
  return;
 }
 StdUdfWrapper newWrapper = (StdUdfWrapper) newInstance;
 newWrapper._inputObjectInspectors = _inputObjectInspectors;
 newWrapper._stdFactory = _stdFactory;
 newWrapper._stdUdf = _stdUdf;
 newWrapper._nullableArguments = _stdUdf.getAndCheckNullableArguments();
 newWrapper._stdUdf.init(_stdFactory);
 newWrapper._requiredFilesProcessed = false;
 newWrapper.createStdData();
}
origin: linkedin/transport

@Override
public void copyToNewInstance(Object newInstance) throws UDFArgumentException {
 super.copyToNewInstance(newInstance);
 if (_stdUdf == null) {
  return;
 }
 StdUdfWrapper newWrapper = (StdUdfWrapper) newInstance;
 newWrapper._inputObjectInspectors = _inputObjectInspectors;
 newWrapper._stdFactory = _stdFactory;
 newWrapper._stdUdf = _stdUdf;
 newWrapper._nullableArguments = _stdUdf.getAndCheckNullableArguments();
 newWrapper._stdUdf.init(_stdFactory);
 newWrapper._requiredFilesProcessed = false;
 newWrapper.createStdData();
}
origin: com.linkedin.transport/transportable-udfs-presto

@Override
public ScalarFunctionImplementation specialize(BoundVariables boundVariables, int arity, TypeManager typeManager,
  FunctionRegistry functionRegistry) {
 StdFactory stdFactory = new PrestoFactory(boundVariables, typeManager, functionRegistry);
 StdUDF stdUDF = getStdUDF();
 stdUDF.init(stdFactory);
 // Subtract a small jitter value so that refresh is triggered on first call
 // Do not add extra delay, if refresh time was set to lower value by an earlier specialize
 long initialJitter = getRefreshIntervalMillis() / JITTER_FACTOR;
 int initialJitterInt = initialJitter > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) initialJitter;
 _requiredFilesNextRefreshTime =
   Math.min(_requiredFilesNextRefreshTime, System.currentTimeMillis() - (new Random()).nextInt(initialJitterInt));
 boolean[] nullableArguments = stdUDF.getAndCheckNullableArguments();
 return new ScalarFunctionImplementation(true, getNullConventionForArguments(nullableArguments),
   getMethodHandle(stdUDF, typeManager, boundVariables, nullableArguments), isDeterministic());
}
origin: linkedin/transport

@Override
public ScalarFunctionImplementation specialize(BoundVariables boundVariables, int arity, TypeManager typeManager,
  FunctionRegistry functionRegistry) {
 StdFactory stdFactory = new PrestoFactory(boundVariables, typeManager, functionRegistry);
 StdUDF stdUDF = getStdUDF();
 stdUDF.init(stdFactory);
 // Subtract a small jitter value so that refresh is triggered on first call
 // Do not add extra delay, if refresh time was set to lower value by an earlier specialize
 long initialJitter = getRefreshIntervalMillis() / JITTER_FACTOR;
 int initialJitterInt = initialJitter > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) initialJitter;
 _requiredFilesNextRefreshTime =
   Math.min(_requiredFilesNextRefreshTime, System.currentTimeMillis() - (new Random()).nextInt(initialJitterInt));
 boolean[] nullableArguments = stdUDF.getAndCheckNullableArguments();
 return new ScalarFunctionImplementation(true, getNullConventionForArguments(nullableArguments),
   getMethodHandle(stdUDF, typeManager, boundVariables, nullableArguments), isDeterministic());
}
origin: linkedin/transport

/**
 * Given input {@link TestType}s, this method matches them to the expected {@link TestType}, and finds bindings to the
 * generic parameters. Once the generic parameter bindings are known, the method infers the output type (in the form
 * of a {@link TestType}) by substituting the binding values in the output {@link TestType}.
 *
 * @param arguments Input {@link TestType} of UDF parameters.
 * @return Inferred output {@link TestType}.
 */
public TestType initialize(TestType[] arguments) {
 GenericTypeInference genericTypeInference = new GenericTypeInference();
 genericTypeInference.compile(arguments, getStdUdfImplementations(), getTopLevelUdfClass());
 _inputTypes = genericTypeInference.getInputDataTypes();
 _stdFactory = genericTypeInference.getStdFactory();
 _stdUdf = genericTypeInference.getStdUdf();
 _nullableArguments = _stdUdf.getAndCheckNullableArguments();
 _stdUdf.init(_stdFactory);
 _requiredFilesProcessed = false;
 createStdData();
 return genericTypeInference.getOutputDataType();
}
origin: com.linkedin.transport/transportable-udfs-avro

/**
 * Given input schemas, this method matches them to the expected type signatures, and finds bindings to the
 * generic parameters. Once the generic parameter bindings are known, the method infers the output type (in the form
 * of an Avro schema) by substituting the binding values in the output type signature.
 * signature and
 * @param arguments Input Avro Schemas of UDF parameters.
 * @return Inferred output Avro Schema.
 */
public Schema initialize(Schema[] arguments) {
 AvroTypeInference avroTypeInference = new AvroTypeInference();
 avroTypeInference.compile(arguments, getStdUdfImplementations(), getTopLevelUdfClass());
 _inputSchemas = avroTypeInference.getInputDataTypes();
 _stdFactory = avroTypeInference.getStdFactory();
 _stdUdf = avroTypeInference.getStdUdf();
 _nullableArguments = _stdUdf.getAndCheckNullableArguments();
 _stdUdf.init(_stdFactory);
 _requiredFilesProcessed = false;
 createStdData();
 return avroTypeInference.getOutputDataType();
}
origin: linkedin/transport

/**
 * Given input schemas, this method matches them to the expected type signatures, and finds bindings to the
 * generic parameters. Once the generic parameter bindings are known, the method infers the output type (in the form
 * of an Avro schema) by substituting the binding values in the output type signature.
 * signature and
 * @param arguments Input Avro Schemas of UDF parameters.
 * @return Inferred output Avro Schema.
 */
public Schema initialize(Schema[] arguments) {
 AvroTypeInference avroTypeInference = new AvroTypeInference();
 avroTypeInference.compile(arguments, getStdUdfImplementations(), getTopLevelUdfClass());
 _inputSchemas = avroTypeInference.getInputDataTypes();
 _stdFactory = avroTypeInference.getStdFactory();
 _stdUdf = avroTypeInference.getStdUdf();
 _nullableArguments = _stdUdf.getAndCheckNullableArguments();
 _stdUdf.init(_stdFactory);
 _requiredFilesProcessed = false;
 createStdData();
 return avroTypeInference.getOutputDataType();
}
origin: com.linkedin.transport/transportable-udfs-hive

/**
 * Given input object inspectors, this method matches them to the expected type signatures, and finds bindings to the
 * generic parameters. Once the generic parameter bindings are known, the method infers the output type (in the form
 * of object inspectors) by substituting the binding values in the output type signature.
 * signature and
 * @param arguments Input object inspectors of UDF parameters.
 * @return Inferred output object inspector.
 */
@Override
public ObjectInspector initialize(ObjectInspector[] arguments) {
 HiveTypeInference hiveTypeInference = new HiveTypeInference();
 hiveTypeInference.compile(
   arguments,
   getStdUdfImplementations(),
   getTopLevelUdfClass()
 );
 _inputObjectInspectors = hiveTypeInference.getInputDataTypes();
 _stdFactory = hiveTypeInference.getStdFactory();
 _stdUdf = hiveTypeInference.getStdUdf();
 _nullableArguments = _stdUdf.getAndCheckNullableArguments();
 _stdUdf.init(_stdFactory);
 _requiredFilesProcessed = false;
 createStdData();
 return hiveTypeInference.getOutputDataType();
}
origin: linkedin/transport

/**
 * Given input object inspectors, this method matches them to the expected type signatures, and finds bindings to the
 * generic parameters. Once the generic parameter bindings are known, the method infers the output type (in the form
 * of object inspectors) by substituting the binding values in the output type signature.
 * signature and
 * @param arguments Input object inspectors of UDF parameters.
 * @return Inferred output object inspector.
 */
@Override
public ObjectInspector initialize(ObjectInspector[] arguments) {
 HiveTypeInference hiveTypeInference = new HiveTypeInference();
 hiveTypeInference.compile(
   arguments,
   getStdUdfImplementations(),
   getTopLevelUdfClass()
 );
 _inputObjectInspectors = hiveTypeInference.getInputDataTypes();
 _stdFactory = hiveTypeInference.getStdFactory();
 _stdUdf = hiveTypeInference.getStdUdf();
 _nullableArguments = _stdUdf.getAndCheckNullableArguments();
 _stdUdf.init(_stdFactory);
 _requiredFilesProcessed = false;
 createStdData();
 return hiveTypeInference.getOutputDataType();
}
com.linkedin.transport.api.udfStdUDFgetAndCheckNullableArguments

Javadoc

Returns an array of booleans indicating if any input argument is nullable and also verifies its length

Popular methods of StdUDF

  • init
    Performs necessary initializations for a StdUDF. This method is called before any records are proces
  • processRequiredFiles
    Processes the localized files for the StdUDF. This method is called before any records are processed
  • getInputParameterSignatures
    Returns a List of type signature strings representing the input parameters to the UDF
  • getOutputParameterSignature
    Returns a type signature string representing the output parameter to the UDF
  • getNullableArguments
    Returns an array of booleans indicating if any input argument is nullable. Nullable arguments are ar
  • getStdFactory
    Returns a StdFactory object which can be used to create StdData and StdType objects
  • numberOfArguments
    Returns the number of input arguments for the StdUDF

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • getSharedPreferences (Context)
  • getExternalFilesDir (Context)
  • Kernel (java.awt.image)
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • ImageIO (javax.imageio)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top plugins for Android Studio
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