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

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

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

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

@VisibleForTesting
static List<TypeVariableConstraint> getTypeVariableConstraintsForStdUdf(StdUDF stdUdf) {
 Set<GenericTypeSignatureElement> genericTypes = new HashSet<>();
 for (String s : stdUdf.getInputParameterSignatures()) {
  genericTypes.addAll(com.linkedin.transport.typesystem.TypeSignature.parse(s).getGenericTypeSignatureElements());
 }
 genericTypes.addAll(com.linkedin.transport.typesystem.TypeSignature.parse(stdUdf.getOutputParameterSignature())
   .getGenericTypeSignatureElements());
 return genericTypes.stream().map(t -> typeVariable(t.toString())).collect(Collectors.toList());
}
origin: linkedin/transport

@VisibleForTesting
static List<TypeVariableConstraint> getTypeVariableConstraintsForStdUdf(StdUDF stdUdf) {
 Set<GenericTypeSignatureElement> genericTypes = new HashSet<>();
 for (String s : stdUdf.getInputParameterSignatures()) {
  genericTypes.addAll(com.linkedin.transport.typesystem.TypeSignature.parse(s).getGenericTypeSignatureElements());
 }
 genericTypes.addAll(com.linkedin.transport.typesystem.TypeSignature.parse(stdUdf.getOutputParameterSignature())
   .getGenericTypeSignatureElements());
 return genericTypes.stream().map(t -> typeVariable(t.toString())).collect(Collectors.toList());
}
origin: linkedin/transport

protected StdUdfWrapper(StdUDF stdUDF) {
 super(new Signature(((TopLevelStdUDF) stdUDF).getFunctionName(), FunctionKind.SCALAR,
   getTypeVariableConstraintsForStdUdf(stdUDF), ImmutableList.of(),
   parseTypeSignature(stdUDF.getOutputParameterSignature()), stdUDF.getInputParameterSignatures()
   .stream()
   .map(TypeSignature::parseTypeSignature)
   .collect(Collectors.toList()), false));
 _functionDescription = ((TopLevelStdUDF) stdUDF).getFunctionDescription();
}
origin: com.linkedin.transport/transportable-udfs-presto

protected StdUdfWrapper(StdUDF stdUDF) {
 super(new Signature(((TopLevelStdUDF) stdUDF).getFunctionName(), FunctionKind.SCALAR,
   getTypeVariableConstraintsForStdUdf(stdUDF), ImmutableList.of(),
   parseTypeSignature(stdUDF.getOutputParameterSignature()), stdUDF.getInputParameterSignatures()
   .stream()
   .map(TypeSignature::parseTypeSignature)
   .collect(Collectors.toList()), false));
 _functionDescription = ((TopLevelStdUDF) stdUDF).getFunctionDescription();
}
origin: linkedin/transport

boolean atLeastOneInputParametersSignaturesBindingSuccess = false;
for (StdUDF stdUdf: stdUdfImplementations) {
 List<String> inputParameterSignatures = stdUdf.getInputParameterSignatures();
 if (inputParameterSignatures.size() != dataTypes.length) {
  continue;
origin: com.linkedin.transport/transportable-udfs-type-system

boolean atLeastOneInputParametersSignaturesBindingSuccess = false;
for (StdUDF stdUdf: stdUdfImplementations) {
 List<String> inputParameterSignatures = stdUdf.getInputParameterSignatures();
 if (inputParameterSignatures.size() != dataTypes.length) {
  continue;
origin: com.linkedin.transport/transportable-udfs-presto

private MethodHandle getMethodHandle(StdUDF stdUDF, TypeManager typeManager, BoundVariables boundVariables,
  boolean[] nullableArguments) {
 Type[] inputTypes = getPrestoTypes(stdUDF.getInputParameterSignatures(), typeManager, boundVariables);
 Type outputType = getPrestoType(stdUDF.getOutputParameterSignature(), typeManager, boundVariables);
 // Generic MethodHandle for eval where all arguments are of type Object
 Class<?>[] genericMethodHandleArgumentTypes = getMethodHandleArgumentTypes(inputTypes, nullableArguments, true);
 MethodHandle genericMethodHandle =
   methodHandle(StdUdfWrapper.class, "evalInternal", genericMethodHandleArgumentTypes).bindTo(this);
 Class<?>[] specificMethodHandleArgumentTypes = getMethodHandleArgumentTypes(inputTypes, nullableArguments, false);
 Class<?> specificMethodHandleReturnType = getMethodHandleJavaType(outputType, true, 0);
 MethodType specificMethodType =
   MethodType.methodType(specificMethodHandleReturnType, specificMethodHandleArgumentTypes);
 // Specific MethodHandle required by presto where argument types map to the type signature
 MethodHandle specificMethodHandle = MethodHandles.explicitCastArguments(genericMethodHandle, specificMethodType);
 return MethodHandles.insertArguments(specificMethodHandle, 0, stdUDF, inputTypes,
   outputType instanceof IntegerType);
}
origin: linkedin/transport

private MethodHandle getMethodHandle(StdUDF stdUDF, TypeManager typeManager, BoundVariables boundVariables,
  boolean[] nullableArguments) {
 Type[] inputTypes = getPrestoTypes(stdUDF.getInputParameterSignatures(), typeManager, boundVariables);
 Type outputType = getPrestoType(stdUDF.getOutputParameterSignature(), typeManager, boundVariables);
 // Generic MethodHandle for eval where all arguments are of type Object
 Class<?>[] genericMethodHandleArgumentTypes = getMethodHandleArgumentTypes(inputTypes, nullableArguments, true);
 MethodHandle genericMethodHandle =
   methodHandle(StdUdfWrapper.class, "evalInternal", genericMethodHandleArgumentTypes).bindTo(this);
 Class<?>[] specificMethodHandleArgumentTypes = getMethodHandleArgumentTypes(inputTypes, nullableArguments, false);
 Class<?> specificMethodHandleReturnType = getMethodHandleJavaType(outputType, true, 0);
 MethodType specificMethodType =
   MethodType.methodType(specificMethodHandleReturnType, specificMethodHandleArgumentTypes);
 // Specific MethodHandle required by presto where argument types map to the type signature
 MethodHandle specificMethodHandle = MethodHandles.explicitCastArguments(genericMethodHandle, specificMethodType);
 return MethodHandles.insertArguments(specificMethodHandle, 0, stdUDF, inputTypes,
   outputType instanceof IntegerType);
}
com.linkedin.transport.api.udfStdUDFgetInputParameterSignatures

Javadoc

Returns a List of type signature strings representing the input parameters to the UDF

Popular methods of StdUDF

  • getAndCheckNullableArguments
    Returns an array of booleans indicating if any input argument is nullable and also verifies its leng
  • 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
  • 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

  • Updating database using SQL prepared statement
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top Vim plugins
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