def bind_function_expr(expr: FunctionExpression, column_mapping): catalog = CatalogManager() udf_obj = catalog.get_udf_by_name(expr.name) if expr.output: expr.output_obj = catalog.get_udf_io_by_name(expr.output) if expr.output_obj is None: LoggingManager().log( 'Invalid output {} selected for UDF {}'.format( expr.output, expr.name), LoggingLevel().ERROR) expr.function = path_to_class(udf_obj.impl_file_path, udf_obj.name)()
def bind_function_expr(expr: FunctionExpression, column_mapping): catalog = CatalogManager() udf_obj = catalog.get_udf_by_name(expr.name) class_path = '.'.join([udf_obj.impl_file_path, udf_obj.name]) expr.function = str_to_class(class_path)()