mirror of
https://github.com/apache/impala.git
synced 2025-12-30 21:02:41 -05:00
FromUtc and ToUtc use thirdparty libraries which use inline asm which isn't currently supported with JIT. The UDFs are included in this commit, but the function symbols were not changed in impala_functions.py Change-Id: I0824a434d4a26a39abf29bc6e47d51b5ad7991d6 Reviewed-on: http://gerrit.ent.cloudera.com:8080/3390 Reviewed-by: Paden Tomasello <paden.tomasello@cloudera.com> Tested-by: jenkins (cherry picked from commit 8e149ccd78010b7a22d6fff1b0de5614848b02ac) Reviewed-on: http://gerrit.ent.cloudera.com:8080/3548
545 lines
37 KiB
Python
Executable File
545 lines
37 KiB
Python
Executable File
#!/usr/bin/env python
|
|
# Copyright 2012 Cloudera Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
# This is a list of all the functions that are not auto-generated.
|
|
# It contains all the meta data that describes the function.
|
|
templated_type_symbol_map = {
|
|
'bool' : 'b',
|
|
'int8_t' : 'a',
|
|
'int16_t' : 's',
|
|
'int32_t' : 'i',
|
|
'int64_t' : 'l',
|
|
'float' : 'f',
|
|
'double' : 'd',
|
|
'string' : 'NS_11StringValueE',
|
|
'timestamp' : 'NS_14TimestampValueE'
|
|
}
|
|
|
|
# Generates the BE symbol for the Compute Function class_name::fn_name<templated_type>.
|
|
# Does not handle varargs.
|
|
# TODO: this is a stopgap. ComputeFunctions are being removed and we can use the
|
|
# symbol lookup code in the BE.
|
|
def symbol(class_name, fn_name, templated_type = None):
|
|
sym = '_ZN6impala'
|
|
sym += str(len(class_name)) + class_name
|
|
sym += str(len(fn_name)) + fn_name
|
|
if templated_type == None:
|
|
sym += 'EPNS_4ExprEPNS_8TupleRowE'
|
|
else:
|
|
sym += 'I'
|
|
sym += templated_type_symbol_map[templated_type]
|
|
sym += 'EEPvPNS_4ExprEPNS_8TupleRowE'
|
|
return sym
|
|
|
|
# The format is:
|
|
# [sql aliases], <return_type>, [<args>], <backend symbol>,
|
|
# With an optional
|
|
# <prepare symbol>, <close symbol>
|
|
#
|
|
# 'sql aliases' are the function names that can be used from sql. There must be
|
|
# at least one per function.
|
|
#
|
|
# The symbol can be empty for functions that are not yet implemented.
|
|
functions = [
|
|
# Math builtin functions
|
|
[['pi'], 'DOUBLE', [], symbol('MathFunctions', 'Pi')],
|
|
[['e'], 'DOUBLE', [], symbol('MathFunctions', 'E')],
|
|
[['abs'], 'DOUBLE', ['DOUBLE'], symbol('MathFunctions', 'Abs')],
|
|
[['sign'], 'FLOAT', ['DOUBLE'], symbol('MathFunctions', 'Sign')],
|
|
[['sin'], 'DOUBLE', ['DOUBLE'], symbol('MathFunctions', 'Sin')],
|
|
[['asin'], 'DOUBLE', ['DOUBLE'], symbol('MathFunctions', 'Asin')],
|
|
[['cos'], 'DOUBLE', ['DOUBLE'], symbol('MathFunctions', 'Cos')],
|
|
[['acos'], 'DOUBLE', ['DOUBLE'], symbol('MathFunctions', 'Acos')],
|
|
[['tan'], 'DOUBLE', ['DOUBLE'], symbol('MathFunctions', 'Tan')],
|
|
[['atan'], 'DOUBLE', ['DOUBLE'], symbol('MathFunctions', 'Atan')],
|
|
[['radians'], 'DOUBLE', ['DOUBLE'], symbol('MathFunctions', 'Radians')],
|
|
[['degrees'], 'DOUBLE', ['DOUBLE'], symbol('MathFunctions', 'Degrees')],
|
|
[['ceil', 'ceiling'], 'BIGINT', ['DOUBLE'], symbol('MathFunctions', 'Ceil')],
|
|
[['floor'], 'BIGINT', ['DOUBLE'], symbol('MathFunctions', 'Floor')],
|
|
[['round'], 'BIGINT', ['DOUBLE'], symbol('MathFunctions', 'Round')],
|
|
[['round'], 'DOUBLE', ['DOUBLE', 'INT'], symbol('MathFunctions', 'RoundUpTo')],
|
|
[['exp'], 'DOUBLE', ['DOUBLE'], symbol('MathFunctions', 'Exp')],
|
|
[['ln'], 'DOUBLE', ['DOUBLE'], symbol('MathFunctions', 'Ln')],
|
|
[['log10'], 'DOUBLE', ['DOUBLE'], symbol('MathFunctions', 'Log10')],
|
|
[['log2'], 'DOUBLE', ['DOUBLE'], symbol('MathFunctions', 'Log2')],
|
|
[['log'], 'DOUBLE', ['DOUBLE', 'DOUBLE'], symbol('MathFunctions', 'Log')],
|
|
[['pow', 'power'], 'DOUBLE', ['DOUBLE', 'DOUBLE'], symbol('MathFunctions', 'Pow')],
|
|
[['sqrt'], 'DOUBLE', ['DOUBLE'], symbol('MathFunctions', 'Sqrt')],
|
|
[['rand'], 'DOUBLE', [], symbol('MathFunctions', 'Rand')],
|
|
[['rand'], 'DOUBLE', ['INT'], symbol('MathFunctions', 'RandSeed')],
|
|
[['bin'], 'STRING', ['BIGINT'], symbol('MathFunctions', 'Bin')],
|
|
[['hex'], 'STRING', ['BIGINT'], symbol('MathFunctions', 'HexInt')],
|
|
[['hex'], 'STRING', ['STRING'], symbol('MathFunctions', 'HexString')],
|
|
[['unhex'], 'STRING', ['STRING'], symbol('MathFunctions', 'Unhex')],
|
|
[['conv'], 'STRING', ['BIGINT', 'TINYINT', 'TINYINT'],
|
|
symbol('MathFunctions', 'ConvInt')],
|
|
[['conv'], 'STRING', ['STRING', 'TINYINT', 'TINYINT'],
|
|
symbol('MathFunctions', 'ConvString')],
|
|
[['pmod'], 'BIGINT', ['BIGINT', 'BIGINT'], symbol('MathFunctions', 'PmodBigInt')],
|
|
[['pmod'], 'DOUBLE', ['DOUBLE', 'DOUBLE'], symbol('MathFunctions', 'PmodDouble')],
|
|
[['fmod'], 'FLOAT', ['FLOAT', 'FLOAT'], symbol('MathFunctions', 'FmodFloat')],
|
|
[['fmod'], 'DOUBLE', ['DOUBLE', 'DOUBLE'], symbol('MathFunctions', 'FmodDouble')],
|
|
[['positive'], 'TINYINT', ['TINYINT'], symbol('MathFunctions', 'Positive')],
|
|
[['positive'], 'SMALLINT', ['SMALLINT'], symbol('MathFunctions', 'Positive')],
|
|
[['positive'], 'INT', ['INT'], symbol('MathFunctions', 'Positive')],
|
|
[['positive'], 'BIGINT', ['BIGINT'], symbol('MathFunctions', 'Positive')],
|
|
[['positive'], 'FLOAT', ['FLOAT'], symbol('MathFunctions', 'Positive')],
|
|
[['positive'], 'DOUBLE', ['DOUBLE'], symbol('MathFunctions', 'Positive')],
|
|
[['positive'], 'DECIMAL', ['DECIMAL'], symbol('MathFunctions', 'Positive')],
|
|
[['negative'], 'TINYINT', ['TINYINT'], symbol('MathFunctions', 'Negative', 'int8_t')],
|
|
[['negative'], 'SMALLINT', ['SMALLINT'], symbol('MathFunctions', 'Negative', 'int16_t')],
|
|
[['negative'], 'INT', ['INT'], symbol('MathFunctions', 'Negative', 'int32_t')],
|
|
[['negative'], 'BIGINT', ['BIGINT'], symbol('MathFunctions', 'Negative', 'int64_t')],
|
|
[['negative'], 'FLOAT', ['FLOAT'], symbol('MathFunctions', 'Negative', 'float')],
|
|
[['negative'], 'DOUBLE', ['DOUBLE'], symbol('MathFunctions', 'Negative', 'double')],
|
|
[['negative'], 'DECIMAL', ['DECIMAL'], symbol('MathFunctions', 'NegativeDecimal')],
|
|
[['quotient'], 'BIGINT', ['BIGINT', 'BIGINT'],
|
|
symbol('MathFunctions', 'QuotientBigInt')],
|
|
[['quotient'], 'BIGINT', ['DOUBLE', 'DOUBLE'],
|
|
symbol('MathFunctions', 'QuotientDouble')],
|
|
[['least'], 'TINYINT', ['TINYINT', '...'],
|
|
'_ZN6impala13MathFunctions13LeastGreatestIaLb1EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['least'], 'SMALLINT', ['SMALLINT', '...'],
|
|
'_ZN6impala13MathFunctions13LeastGreatestIsLb1EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['least'], 'INT', ['INT', '...'],
|
|
'_ZN6impala13MathFunctions13LeastGreatestIiLb1EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['least'], 'BIGINT', ['BIGINT', '...'],
|
|
'_ZN6impala13MathFunctions13LeastGreatestIlLb1EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['least'], 'FLOAT', ['FLOAT', '...'],
|
|
'_ZN6impala13MathFunctions13LeastGreatestIfLb1EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['least'], 'DOUBLE', ['DOUBLE', '...'],
|
|
'_ZN6impala13MathFunctions13LeastGreatestIdLb1EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['least'], 'TIMESTAMP', ['TIMESTAMP', '...'],
|
|
'_ZN6impala13MathFunctions13LeastGreatestINS_14TimestampValueELb1EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['least'], 'STRING', ['STRING', '...'],
|
|
'_ZN6impala13MathFunctions19LeastGreatestStringILb1EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['least'], 'DECIMAL', ['DECIMAL', '...'],
|
|
'_ZN6impala13MathFunctions20LeastGreatestDecimalILb1EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['greatest'], 'TINYINT', ['TINYINT', '...'],
|
|
'_ZN6impala13MathFunctions13LeastGreatestIaLb0EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['greatest'], 'SMALLINT', ['SMALLINT', '...'],
|
|
'_ZN6impala13MathFunctions13LeastGreatestIsLb0EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['greatest'], 'INT', ['INT', '...'],
|
|
'_ZN6impala13MathFunctions13LeastGreatestIiLb0EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['greatest'], 'BIGINT', ['BIGINT', '...'],
|
|
'_ZN6impala13MathFunctions13LeastGreatestIlLb0EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['greatest'], 'FLOAT', ['FLOAT', '...'],
|
|
'_ZN6impala13MathFunctions13LeastGreatestIfLb0EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['greatest'], 'DOUBLE', ['DOUBLE', '...'],
|
|
'_ZN6impala13MathFunctions13LeastGreatestIdLb0EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['greatest'], 'TIMESTAMP', ['TIMESTAMP', '...'],
|
|
'_ZN6impala13MathFunctions13LeastGreatestINS_14TimestampValueELb0EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['greatest'], 'STRING', ['STRING', '...'],
|
|
'_ZN6impala13MathFunctions19LeastGreatestStringILb0EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['greatest'], 'DECIMAL', ['DECIMAL', '...'],
|
|
'_ZN6impala13MathFunctions20LeastGreatestDecimalILb0EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
|
|
# String builtin functions
|
|
[['substr', 'substring'], 'STRING', ['STRING', 'INT'],
|
|
symbol('StringFunctions', 'Substring', 'int32_t')],
|
|
[['substr', 'substring'], 'STRING', ['STRING', 'BIGINT'],
|
|
symbol('StringFunctions', 'Substring', 'int64_t')],
|
|
[['substr', 'substring'], 'STRING', ['STRING', 'INT', 'INT'],
|
|
symbol('StringFunctions', 'Substring', 'int32_t')],
|
|
[['substr', 'substring'], 'STRING', ['STRING', 'BIGINT', 'BIGINT'],
|
|
symbol('StringFunctions', 'Substring', 'int64_t')],
|
|
# left and right are key words, leave them out for now.
|
|
[['strleft'], 'STRING', ['STRING', 'INT'],
|
|
symbol('StringFunctions', 'Left', 'int32_t')],
|
|
[['strleft'], 'STRING', ['STRING', 'BIGINT'],
|
|
symbol('StringFunctions', 'Left', 'int64_t')],
|
|
[['strright'], 'STRING', ['STRING', 'INT'],
|
|
symbol('StringFunctions', 'Right', 'int32_t')],
|
|
[['strright'], 'STRING', ['STRING', 'BIGINT'],
|
|
symbol('StringFunctions', 'Right', 'int64_t')],
|
|
[['space'], 'STRING', ['INT'], symbol('StringFunctions', 'Space', 'int32_t')],
|
|
[['space'], 'STRING', ['BIGINT'], symbol('StringFunctions', 'Space', 'int64_t')],
|
|
[['repeat'], 'STRING', ['STRING', 'INT'],
|
|
symbol('StringFunctions', 'Repeat', 'int32_t')],
|
|
[['repeat'], 'STRING', ['STRING', 'BIGINT'],
|
|
symbol('StringFunctions', 'Repeat', 'int64_t')],
|
|
[['lpad'], 'STRING', ['STRING', 'INT', 'STRING'],
|
|
symbol('StringFunctions', 'Lpad', 'int32_t')],
|
|
[['lpad'], 'STRING', ['STRING', 'BIGINT', 'STRING'],
|
|
symbol('StringFunctions', 'Lpad', 'int64_t')],
|
|
[['rpad'], 'STRING', ['STRING', 'INT', 'STRING'],
|
|
symbol('StringFunctions', 'Rpad', 'int32_t')],
|
|
[['rpad'], 'STRING', ['STRING', 'BIGINT', 'STRING'],
|
|
symbol('StringFunctions', 'Rpad', 'int64_t')],
|
|
[['length'], 'INT', ['STRING'], symbol('StringFunctions', 'Length')],
|
|
[['char_length'], 'INT', ['STRING'], symbol('StringFunctions', 'Length')],
|
|
[['character_length'], 'INT', ['STRING'], symbol('StringFunctions', 'Length')],
|
|
[['lower', 'lcase'], 'STRING', ['STRING'], symbol('StringFunctions', 'Lower')],
|
|
[['upper', 'ucase'], 'STRING', ['STRING'], symbol('StringFunctions', 'Upper')],
|
|
[['initcap'], 'STRING', ['STRING'], symbol('StringFunctions', 'InitCap')],
|
|
[['reverse'], 'STRING', ['STRING'], symbol('StringFunctions', 'Reverse')],
|
|
[['translate'], 'STRING', ['STRING', 'STRING', 'STRING'],
|
|
symbol('StringFunctions', 'Translate')],
|
|
[['trim'], 'STRING', ['STRING'], symbol('StringFunctions', 'Trim')],
|
|
[['ltrim'], 'STRING', ['STRING'], symbol('StringFunctions', 'Ltrim')],
|
|
[['rtrim'], 'STRING', ['STRING'], symbol('StringFunctions', 'Rtrim')],
|
|
[['ascii'], 'INT', ['STRING'], symbol('StringFunctions', 'Ascii')],
|
|
[['instr'], 'INT', ['STRING', 'STRING'], symbol('StringFunctions', 'Instr')],
|
|
[['locate'], 'INT', ['STRING', 'STRING'], symbol('StringFunctions', 'Locate')],
|
|
[['locate'], 'INT', ['STRING', 'STRING', 'INT'],
|
|
symbol('StringFunctions', 'LocatePos', 'int32_t')],
|
|
[['locate'], 'INT', ['STRING', 'STRING', 'BIGINT'],
|
|
symbol('StringFunctions', 'LocatePos', 'int64_t')],
|
|
[['regexp_extract'], 'STRING', ['STRING', 'STRING', 'INT'],
|
|
symbol('StringFunctions', 'RegexpExtract', 'int32_t')],
|
|
[['regexp_extract'], 'STRING', ['STRING', 'STRING', 'BIGINT'],
|
|
symbol('StringFunctions', 'RegexpExtract', 'int64_t')],
|
|
[['regexp_replace'], 'STRING', ['STRING', 'STRING', 'STRING'],
|
|
symbol('StringFunctions', 'RegexpReplace')],
|
|
[['concat'], 'STRING', ['STRING', '...'], symbol('StringFunctions', 'Concat')],
|
|
[['concat_ws'], 'STRING', ['STRING', 'STRING', '...'],
|
|
symbol('StringFunctions', 'ConcatWs')],
|
|
[['find_in_set'], 'INT', ['STRING', 'STRING'], symbol('StringFunctions', 'FindInSet')],
|
|
[['parse_url'], 'STRING', ['STRING', 'STRING'], symbol('StringFunctions', 'ParseUrl')],
|
|
[['parse_url'], 'STRING', ['STRING', 'STRING', 'STRING'],
|
|
symbol('StringFunctions', 'ParseUrlKey')],
|
|
|
|
# Utility functions
|
|
[['current_database'], 'STRING', [], symbol('UtilityFunctions', 'CurrentDatabase')],
|
|
[['user'], 'STRING', [], symbol('UtilityFunctions', 'User')],
|
|
[['sleep'], 'BOOLEAN', ['INT'], symbol('UtilityFunctions', 'Sleep')],
|
|
[['pid'], 'INT', [], symbol('UtilityFunctions', 'Pid')],
|
|
[['version'], 'STRING', [], symbol('UtilityFunctions', 'Version')],
|
|
|
|
[['fnv_hash'], 'BIGINT', ['TINYINT'],
|
|
'_ZN6impala16UtilityFunctions7FnvHashILi1EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['fnv_hash'], 'BIGINT', ['SMALLINT'],
|
|
'_ZN6impala16UtilityFunctions7FnvHashILi2EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['fnv_hash'], 'BIGINT', ['INT'],
|
|
'_ZN6impala16UtilityFunctions7FnvHashILi4EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['fnv_hash'], 'BIGINT', ['BIGINT'],
|
|
'_ZN6impala16UtilityFunctions7FnvHashILi8EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['fnv_hash'], 'BIGINT', ['FLOAT'],
|
|
'_ZN6impala16UtilityFunctions7FnvHashILi4EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['fnv_hash'], 'BIGINT', ['DOUBLE'],
|
|
'_ZN6impala16UtilityFunctions7FnvHashILi8EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['fnv_hash'], 'BIGINT', ['TIMESTAMP'],
|
|
'_ZN6impala16UtilityFunctions7FnvHashILi12EEEPvPNS_4ExprEPNS_8TupleRowE'],
|
|
[['fnv_hash'], 'BIGINT', ['STRING'],
|
|
'_ZN6impala16UtilityFunctions13FnvHashStringEPNS_4ExprEPNS_8TupleRowE'],
|
|
[['fnv_hash'], 'BIGINT', ['DECIMAL'], symbol('UtilityFunctions', 'FnvHashDecimal')],
|
|
|
|
# Timestamp Functions
|
|
|
|
[['from_utc_timestamp'], 'TIMESTAMP', ['TIMESTAMP', 'STRING'],
|
|
symbol('TimestampFunctions', 'FromUtc')],
|
|
[['to_utc_timestamp'], 'TIMESTAMP', ['TIMESTAMP', 'STRING'],
|
|
symbol('TimestampFunctions', 'ToUtc')],
|
|
|
|
# Date and time add/sub functions.
|
|
# TODO: there must be a better way to deal with this symbols.
|
|
|
|
|
|
|
|
# Conditional Functions
|
|
[['if'], 'BOOLEAN', ['BOOLEAN', 'BOOLEAN', 'BOOLEAN'],
|
|
symbol('ConditionalFunctions', 'IfFn')],
|
|
[['if'], 'TINYINT', ['BOOLEAN', 'TINYINT', 'TINYINT'],
|
|
symbol('ConditionalFunctions', 'IfFn')],
|
|
[['if'], 'SMALLINT', ['BOOLEAN', 'SMALLINT', 'SMALLINT'],
|
|
symbol('ConditionalFunctions', 'IfFn')],
|
|
[['if'], 'INT', ['BOOLEAN', 'INT', 'INT'],
|
|
symbol('ConditionalFunctions', 'IfFn')],
|
|
[['if'], 'BIGINT', ['BOOLEAN', 'BIGINT', 'BIGINT'],
|
|
symbol('ConditionalFunctions', 'IfFn')],
|
|
[['if'], 'FLOAT', ['BOOLEAN', 'FLOAT', 'FLOAT'],
|
|
symbol('ConditionalFunctions', 'IfFn')],
|
|
[['if'], 'DOUBLE', ['BOOLEAN', 'DOUBLE', 'DOUBLE'],
|
|
symbol('ConditionalFunctions', 'IfFn')],
|
|
[['if'], 'STRING', ['BOOLEAN', 'STRING', 'STRING'],
|
|
symbol('ConditionalFunctions', 'IfFn')],
|
|
[['if'], 'TIMESTAMP', ['BOOLEAN', 'TIMESTAMP', 'TIMESTAMP'],
|
|
symbol('ConditionalFunctions', 'IfFn')],
|
|
[['if'], 'DECIMAL', ['BOOLEAN', 'DECIMAL', 'DECIMAL'],
|
|
symbol('ConditionalFunctions', 'IfFn')],
|
|
|
|
[['nullif'], 'BOOLEAN', ['BOOLEAN', 'BOOLEAN'],
|
|
symbol('ConditionalFunctions', 'NullIf', 'bool')],
|
|
[['nullif'], 'TINYINT', ['TINYINT', 'TINYINT'],
|
|
symbol('ConditionalFunctions', 'NullIf', 'int8_t')],
|
|
[['nullif'], 'SMALLINT', ['SMALLINT', 'SMALLINT'],
|
|
symbol('ConditionalFunctions', 'NullIf', 'int16_t')],
|
|
[['nullif'], 'INT', ['INT', 'INT'],
|
|
symbol('ConditionalFunctions', 'NullIf', 'int32_t')],
|
|
[['nullif'], 'BIGINT', ['BIGINT', 'BIGINT'],
|
|
symbol('ConditionalFunctions', 'NullIf', 'int64_t')],
|
|
[['nullif'], 'FLOAT', ['FLOAT', 'FLOAT'],
|
|
symbol('ConditionalFunctions', 'NullIf', 'float')],
|
|
[['nullif'], 'DOUBLE', ['DOUBLE', 'DOUBLE'],
|
|
symbol('ConditionalFunctions', 'NullIf', 'double')],
|
|
[['nullif'], 'STRING', ['STRING', 'STRING'],
|
|
symbol('ConditionalFunctions', 'NullIf', 'string')],
|
|
[['nullif'], 'TIMESTAMP', ['TIMESTAMP', 'TIMESTAMP'],
|
|
symbol('ConditionalFunctions', 'NullIf', 'timestamp')],
|
|
[['nullif'], 'DECIMAL', ['DECIMAL', 'DECIMAL'],
|
|
symbol('ConditionalFunctions', 'NullIfDecimal')],
|
|
|
|
[['zeroifnull'], 'TINYINT', ['TINYINT'],
|
|
symbol('ConditionalFunctions', 'ZeroIfNull', 'int8_t')],
|
|
[['zeroifnull'], 'SMALLINT', ['SMALLINT'],
|
|
symbol('ConditionalFunctions', 'ZeroIfNull', 'int16_t')],
|
|
[['zeroifnull'], 'INT', ['INT'],
|
|
symbol('ConditionalFunctions', 'ZeroIfNull', 'int32_t')],
|
|
[['zeroifnull'], 'BIGINT', ['BIGINT'],
|
|
symbol('ConditionalFunctions', 'ZeroIfNull', 'int64_t')],
|
|
[['zeroifnull'], 'FLOAT', ['FLOAT'],
|
|
symbol('ConditionalFunctions', 'ZeroIfNull', 'float')],
|
|
[['zeroifnull'], 'DOUBLE', ['DOUBLE'],
|
|
symbol('ConditionalFunctions', 'ZeroIfNull', 'double')],
|
|
[['zeroifnull'], 'DECIMAL', ['DECIMAL'],
|
|
symbol('ConditionalFunctions', 'ZeroIfNullDecimal')],
|
|
|
|
[['nullifzero'], 'TINYINT', ['TINYINT'],
|
|
symbol('ConditionalFunctions', 'NullIfZero', 'int8_t')],
|
|
[['nullifzero'], 'SMALLINT', ['SMALLINT'],
|
|
symbol('ConditionalFunctions', 'NullIfZero', 'int16_t')],
|
|
[['nullifzero'], 'INT', ['INT'],
|
|
symbol('ConditionalFunctions', 'NullIfZero', 'int32_t')],
|
|
[['nullifzero'], 'BIGINT', ['BIGINT'],
|
|
symbol('ConditionalFunctions', 'NullIfZero', 'int64_t')],
|
|
[['nullifzero'], 'FLOAT', ['FLOAT'],
|
|
symbol('ConditionalFunctions', 'NullIfZero', 'float')],
|
|
[['nullifzero'], 'DOUBLE', ['DOUBLE'],
|
|
symbol('ConditionalFunctions', 'NullIfZero', 'double')],
|
|
[['nullifzero'], 'DECIMAL', ['DECIMAL'],
|
|
symbol('ConditionalFunctions', 'NullIfZeroDecimal')],
|
|
|
|
[['isnull', 'ifnull', 'nvl'], 'BOOLEAN', ['BOOLEAN', 'BOOLEAN'],
|
|
symbol('ConditionalFunctions', 'IsNull')],
|
|
[['isnull', 'ifnull', 'nvl'], 'TINYINT', ['TINYINT', 'TINYINT'],
|
|
symbol('ConditionalFunctions', 'IsNull')],
|
|
[['isnull', 'ifnull', 'nvl'], 'SMALLINT', ['SMALLINT', 'SMALLINT'],
|
|
symbol('ConditionalFunctions', 'IsNull')],
|
|
[['isnull', 'ifnull', 'nvl'], 'INT', ['INT', 'INT'],
|
|
symbol('ConditionalFunctions', 'IsNull')],
|
|
[['isnull', 'ifnull', 'nvl'], 'BIGINT', ['BIGINT', 'BIGINT'],
|
|
symbol('ConditionalFunctions', 'IsNull')],
|
|
[['isnull', 'ifnull', 'nvl'], 'FLOAT', ['FLOAT', 'FLOAT'],
|
|
symbol('ConditionalFunctions', 'IsNull')],
|
|
[['isnull', 'ifnull', 'nvl'], 'DOUBLE', ['DOUBLE', 'DOUBLE'],
|
|
symbol('ConditionalFunctions', 'IsNull')],
|
|
[['isnull', 'ifnull', 'nvl'], 'STRING', ['STRING', 'STRING'],
|
|
symbol('ConditionalFunctions', 'IsNull')],
|
|
[['isnull', 'ifnull', 'nvl'], 'TIMESTAMP', ['TIMESTAMP', 'TIMESTAMP'],
|
|
symbol('ConditionalFunctions', 'IsNull')],
|
|
[['isnull', 'ifnull', 'nvl'], 'DECIMAL', ['DECIMAL', 'DECIMAL'],
|
|
symbol('ConditionalFunctions', 'IsNull')],
|
|
|
|
[['coalesce'], 'BOOLEAN', ['BOOLEAN', '...'],
|
|
symbol('ConditionalFunctions', 'Coalesce')],
|
|
[['coalesce'], 'TINYINT', ['TINYINT', '...'],
|
|
symbol('ConditionalFunctions', 'Coalesce')],
|
|
[['coalesce'], 'SMALLINT', ['SMALLINT', '...'],
|
|
symbol('ConditionalFunctions', 'Coalesce')],
|
|
[['coalesce'], 'INT', ['INT', '...'], symbol('ConditionalFunctions', 'Coalesce')],
|
|
[['coalesce'], 'BIGINT', ['BIGINT', '...'], symbol('ConditionalFunctions', 'Coalesce')],
|
|
[['coalesce'], 'FLOAT', ['FLOAT', '...'], symbol('ConditionalFunctions', 'Coalesce')],
|
|
[['coalesce'], 'DOUBLE', ['DOUBLE', '...'], symbol('ConditionalFunctions', 'Coalesce')],
|
|
[['coalesce'], 'STRING', ['STRING', '...'], symbol('ConditionalFunctions', 'Coalesce')],
|
|
[['coalesce'], 'TIMESTAMP', ['TIMESTAMP', '...'],
|
|
symbol('ConditionalFunctions', 'Coalesce')],
|
|
[['coalesce'], 'DECIMAL', ['DECIMAL', '...'],
|
|
symbol('ConditionalFunctions', 'Coalesce')],
|
|
|
|
# Decimal Functions
|
|
# TODO: oracle has decimal support for transcendental functions (e.g. sin()) to very
|
|
# high precisions. Do we need them? It's unclear if other databases do the same.
|
|
[['precision'], 'INT', ['DECIMAL'], symbol('DecimalFunctions', 'Precision')],
|
|
[['scale'], 'INT', ['DECIMAL'], symbol('DecimalFunctions', 'Scale')],
|
|
[['abs'], 'DECIMAL', ['DECIMAL'], symbol('DecimalFunctions', 'Abs')],
|
|
[['ceil', 'ceiling'], 'DECIMAL', ['DECIMAL'], symbol('DecimalFunctions', 'Ceil')],
|
|
[['floor'], 'DECIMAL', ['DECIMAL'], symbol('DecimalFunctions', 'Floor')],
|
|
[['round'], 'DECIMAL', ['DECIMAL'], symbol('DecimalFunctions', 'Round')],
|
|
[['round'], 'DECIMAL', ['DECIMAL', 'TINYINT'], symbol('DecimalFunctions', 'RoundTo')],
|
|
[['round'], 'DECIMAL', ['DECIMAL', 'SMALLINT'], symbol('DecimalFunctions', 'RoundTo')],
|
|
[['round'], 'DECIMAL', ['DECIMAL', 'INT'], symbol('DecimalFunctions', 'RoundTo')],
|
|
[['round'], 'DECIMAL', ['DECIMAL', 'BIGINT'], symbol('DecimalFunctions', 'RoundTo')],
|
|
[['truncate'], 'DECIMAL', ['DECIMAL'], symbol('DecimalFunctions', 'Truncate')],
|
|
[['truncate'], 'DECIMAL', ['DECIMAL', 'TINYINT'],
|
|
symbol('DecimalFunctions', 'TruncateTo')],
|
|
[['truncate'], 'DECIMAL', ['DECIMAL', 'SMALLINT'],
|
|
symbol('DecimalFunctions', 'TruncateTo')],
|
|
[['truncate'], 'DECIMAL', ['DECIMAL', 'INT'],
|
|
symbol('DecimalFunctions', 'TruncateTo')],
|
|
[['truncate'], 'DECIMAL', ['DECIMAL', 'BIGINT'],
|
|
symbol('DecimalFunctions', 'TruncateTo')],
|
|
]
|
|
|
|
# These functions are implemented against the UDF interface.
|
|
# TODO: this list should subsume the one above when all builtins are migrated.
|
|
udf_functions = [
|
|
[['udf_pi'], 'DOUBLE', [],
|
|
'_ZN6impala11UdfBuiltins2PiEPN10impala_udf15FunctionContextE'],
|
|
[['udf_abs'], 'DOUBLE', ['DOUBLE'],
|
|
'_ZN6impala11UdfBuiltins3AbsEPN10impala_udf15FunctionContextERKNS1_9DoubleValE'],
|
|
[['udf_lower'], 'STRING', ['STRING'],
|
|
'_ZN6impala11UdfBuiltins5LowerEPN10impala_udf15FunctionContextERKNS1_9StringValE'],
|
|
[['max_int'], 'INT', [],
|
|
'_ZN6impala11UdfBuiltins6MaxIntEPN10impala_udf15FunctionContextE'],
|
|
[['max_tinyint'], 'TINYINT', [],
|
|
'_ZN6impala11UdfBuiltins10MaxTinyIntEPN10impala_udf15FunctionContextE'],
|
|
[['max_smallint'], 'SMALLINT', [],
|
|
'_ZN6impala11UdfBuiltins11MaxSmallIntEPN10impala_udf15FunctionContextE'],
|
|
[['max_bigint'], 'BIGINT', [],
|
|
'_ZN6impala11UdfBuiltins9MaxBigIntEPN10impala_udf15FunctionContextE'],
|
|
[['min_int'], 'INT', [],
|
|
'_ZN6impala11UdfBuiltins6MinIntEPN10impala_udf15FunctionContextE'],
|
|
[['min_tinyint'], 'TINYINT', [],
|
|
'_ZN6impala11UdfBuiltins10MinTinyIntEPN10impala_udf15FunctionContextE'],
|
|
[['min_smallint'], 'SMALLINT', [],
|
|
'_ZN6impala11UdfBuiltins11MinSmallIntEPN10impala_udf15FunctionContextE'],
|
|
[['min_bigint'], 'BIGINT', [],
|
|
'_ZN6impala11UdfBuiltins9MinBigIntEPN10impala_udf15FunctionContextE'],
|
|
[['is_nan'], 'BOOLEAN', ['DOUBLE'],
|
|
'_ZN6impala11UdfBuiltins5IsNanEPN10impala_udf15FunctionContextERKNS1_9DoubleValE'],
|
|
[['is_inf'], 'BOOLEAN', ['DOUBLE'],
|
|
'_ZN6impala11UdfBuiltins5IsInfEPN10impala_udf15FunctionContextERKNS1_9DoubleValE'],
|
|
[['trunc'], 'TIMESTAMP', ['TIMESTAMP', 'STRING'],
|
|
'_ZN6impala11UdfBuiltins5TruncEPN10impala_udf15FunctionContextERKNS1_12TimestampValERKNS1_9StringValE',
|
|
'_ZN6impala11UdfBuiltins12TruncPrepareEPN10impala_udf15FunctionContextENS2_18FunctionStateScopeE',
|
|
'_ZN6impala11UdfBuiltins10TruncCloseEPN10impala_udf15FunctionContextENS2_18FunctionStateScopeE'],
|
|
[['extract'], 'INT', ['TIMESTAMP', 'STRING'],
|
|
'_ZN6impala11UdfBuiltins7ExtractEPN10impala_udf15FunctionContextERKNS1_12TimestampValERKNS1_9StringValE',
|
|
'_ZN6impala11UdfBuiltins14ExtractPrepareEPN10impala_udf15FunctionContextENS2_18FunctionStateScopeE',
|
|
'_ZN6impala11UdfBuiltins12ExtractCloseEPN10impala_udf15FunctionContextENS2_18FunctionStateScopeE'],
|
|
|
|
[['madlib_encode_vector'], 'STRING', ['STRING'],
|
|
'_ZN6impala11UdfBuiltins12EncodeVectorEPN10impala_udf15FunctionContextERKNS1_9StringValE'],
|
|
[['madlib_decode_vector'], 'STRING', ['STRING'],
|
|
'_ZN6impala11UdfBuiltins12DecodeVectorEPN10impala_udf15FunctionContextERKNS1_9StringValE'],
|
|
[['madlib_print_vector'], 'STRING', ['STRING'],
|
|
'_ZN6impala11UdfBuiltins11PrintVectorEPN10impala_udf15FunctionContextERKNS1_9StringValE'],
|
|
[['madlib_vector'], 'STRING', ['DOUBLE', '...'],
|
|
'_ZN6impala11UdfBuiltins8ToVectorEPN10impala_udf15FunctionContextEiPKNS1_9DoubleValE'],
|
|
[['madlib_vector_get'], 'DOUBLE', ['BIGINT', 'STRING'],
|
|
'_ZN6impala11UdfBuiltins9VectorGetEPN10impala_udf15FunctionContextERKNS1_9BigIntValERKNS1_9StringValE'],
|
|
[['unix_timestamp'], 'INT', ['STRING'], '_ZN6impala18TimestampFunctions14UnixFromStringEPN10impala_udf15FunctionContextERKNS1_9StringValE'],
|
|
[['year'], 'INT', ['TIMESTAMP'], '_ZN6impala18TimestampFunctions4YearEPN10impala_udf15FunctionContextERKNS1_12TimestampValE'],
|
|
[['month'], 'INT', ['TIMESTAMP'], '_ZN6impala18TimestampFunctions5MonthEPN10impala_udf15FunctionContextERKNS1_12TimestampValE'],
|
|
[['dayofweek'], 'INT', ['TIMESTAMP'], '_ZN6impala18TimestampFunctions9DayOfWeekEPN10impala_udf15FunctionContextERKNS1_12TimestampValE'],
|
|
[['day', 'dayofmonth'], 'INT', ['TIMESTAMP'], '_ZN6impala18TimestampFunctions10DayOfMonthEPN10impala_udf15FunctionContextERKNS1_12TimestampValE'],
|
|
[['dayofyear'], 'INT', ['TIMESTAMP'], '_ZN6impala18TimestampFunctions9DayOfYearEPN10impala_udf15FunctionContextERKNS1_12TimestampValE'],
|
|
[['weekofyear'], 'INT', ['TIMESTAMP'], '_ZN6impala18TimestampFunctions10WeekOfYearEPN10impala_udf15FunctionContextERKNS1_12TimestampValE'],
|
|
[['hour'], 'INT', ['TIMESTAMP'], '_ZN6impala18TimestampFunctions4HourEPN10impala_udf15FunctionContextERKNS1_12TimestampValE'],
|
|
[['minute'], 'INT', ['TIMESTAMP'], '_ZN6impala18TimestampFunctions6MinuteEPN10impala_udf15FunctionContextERKNS1_12TimestampValE'],
|
|
[['second'], 'INT', ['TIMESTAMP'], '_ZN6impala18TimestampFunctions6SecondEPN10impala_udf15FunctionContextERKNS1_12TimestampValE'],
|
|
[['to_date'], 'STRING', ['TIMESTAMP'], '_ZN6impala18TimestampFunctions6ToDateEPN10impala_udf15FunctionContextERKNS1_12TimestampValE'],
|
|
[['dayname'], 'STRING', ['TIMESTAMP'], '_ZN6impala18TimestampFunctions7DayNameEPN10impala_udf15FunctionContextERKNS1_12TimestampValE'],
|
|
[['years_add'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10DateAddSubILb1EN10impala_udf6IntValEN5boost9date_time14years_durationINS4_9gregorian21greg_durations_configEEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['years_add'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10DateAddSubILb1EN10impala_udf9BigIntValEN5boost9date_time14years_durationINS4_9gregorian21greg_durations_configEEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['years_sub'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10DateAddSubILb0EN10impala_udf6IntValEN5boost9date_time14years_durationINS4_9gregorian21greg_durations_configEEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['years_sub'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10DateAddSubILb0EN10impala_udf9BigIntValEN5boost9date_time14years_durationINS4_9gregorian21greg_durations_configEEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['months_add', 'add_months'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10DateAddSubILb1EN10impala_udf6IntValEN5boost9date_time15months_durationINS4_9gregorian21greg_durations_configEEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['months_add', 'add_months'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10DateAddSubILb1EN10impala_udf9BigIntValEN5boost9date_time15months_durationINS4_9gregorian21greg_durations_configEEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['months_sub'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10DateAddSubILb0EN10impala_udf6IntValEN5boost9date_time15months_durationINS4_9gregorian21greg_durations_configEEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['months_sub'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10DateAddSubILb0EN10impala_udf9BigIntValEN5boost9date_time15months_durationINS4_9gregorian21greg_durations_configEEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['weeks_add'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10DateAddSubILb1EN10impala_udf6IntValEN5boost9gregorian14weeks_durationEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['weeks_add'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10DateAddSubILb1EN10impala_udf9BigIntValEN5boost9gregorian14weeks_durationEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['weeks_sub'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10DateAddSubILb0EN10impala_udf6IntValEN5boost9gregorian14weeks_durationEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['weeks_sub'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10DateAddSubILb0EN10impala_udf9BigIntValEN5boost9gregorian14weeks_durationEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['days_add', 'date_add', 'adddate'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10DateAddSubILb1EN10impala_udf6IntValEN5boost9gregorian13date_durationEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['days_add', 'date_add', 'adddate'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10DateAddSubILb1EN10impala_udf9BigIntValEN5boost9gregorian13date_durationEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['days_sub', 'date_sub', 'subdate'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10DateAddSubILb0EN10impala_udf6IntValEN5boost9gregorian13date_durationEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['days_sub', 'date_sub', 'subdate'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10DateAddSubILb0EN10impala_udf9BigIntValEN5boost9gregorian13date_durationEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['hours_add'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb1EN10impala_udf6IntValEN5boost10posix_time5hoursEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['hours_add'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb1EN10impala_udf9BigIntValEN5boost10posix_time5hoursEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['hours_sub'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb0EN10impala_udf6IntValEN5boost10posix_time5hoursEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['hours_sub'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb0EN10impala_udf9BigIntValEN5boost10posix_time5hoursEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['minutes_add'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb1EN10impala_udf6IntValEN5boost10posix_time7minutesEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['minutes_add'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb1EN10impala_udf9BigIntValEN5boost10posix_time7minutesEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['minutes_sub'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb0EN10impala_udf6IntValEN5boost10posix_time7minutesEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['minutes_sub'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb0EN10impala_udf9BigIntValEN5boost10posix_time7minutesEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['seconds_add'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb1EN10impala_udf6IntValEN5boost10posix_time7secondsEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['seconds_add'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb1EN10impala_udf9BigIntValEN5boost10posix_time7secondsEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['seconds_sub'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb0EN10impala_udf6IntValEN5boost10posix_time7secondsEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['seconds_sub'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb0EN10impala_udf9BigIntValEN5boost10posix_time7secondsEEENS2_12TimestampValEPNS2_15FunctionContextERKS7_RKT0_'],
|
|
[['milliseconds_add'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb1EN10impala_udf6IntValEN5boost9date_time18subsecond_durationINS4_10posix_time13time_durationELl1000EEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['milliseconds_add'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb1EN10impala_udf9BigIntValEN5boost9date_time18subsecond_durationINS4_10posix_time13time_durationELl1000EEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['milliseconds_sub'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb0EN10impala_udf6IntValEN5boost9date_time18subsecond_durationINS4_10posix_time13time_durationELl1000EEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['milliseconds_sub'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb0EN10impala_udf9BigIntValEN5boost9date_time18subsecond_durationINS4_10posix_time13time_durationELl1000EEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['microseconds_add'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb1EN10impala_udf6IntValEN5boost9date_time18subsecond_durationINS4_10posix_time13time_durationELl1000000EEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['microseconds_add'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb1EN10impala_udf9BigIntValEN5boost9date_time18subsecond_durationINS4_10posix_time13time_durationELl1000000EEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['microseconds_sub'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb0EN10impala_udf6IntValEN5boost9date_time18subsecond_durationINS4_10posix_time13time_durationELl1000000EEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['microseconds_sub'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb0EN10impala_udf9BigIntValEN5boost9date_time18subsecond_durationINS4_10posix_time13time_durationELl1000000EEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['nanoseconds_add'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb1EN10impala_udf6IntValEN5boost9date_time18subsecond_durationINS4_10posix_time13time_durationELl1000000000EEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['nanoseconds_add'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb1EN10impala_udf9BigIntValEN5boost9date_time18subsecond_durationINS4_10posix_time13time_durationELl1000000000EEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['nanoseconds_sub'], 'TIMESTAMP', ['TIMESTAMP', 'INT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb0EN10impala_udf6IntValEN5boost9date_time18subsecond_durationINS4_10posix_time13time_durationELl1000000000EEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['nanoseconds_sub'], 'TIMESTAMP', ['TIMESTAMP', 'BIGINT'],
|
|
'_ZN6impala18TimestampFunctions10TimeAddSubILb0EN10impala_udf9BigIntValEN5boost9date_time18subsecond_durationINS4_10posix_time13time_durationELl1000000000EEEEENS2_12TimestampValEPNS2_15FunctionContextERKSA_RKT0_'],
|
|
[['datediff'], 'INT', ['TIMESTAMP', 'TIMESTAMP'], '_ZN6impala18TimestampFunctions8DateDiffEPN10impala_udf15FunctionContextERKNS1_12TimestampValES6_'],
|
|
[['unix_timestamp'], 'INT', [], '_ZN6impala18TimestampFunctions4UnixEPN10impala_udf15FunctionContextE'],
|
|
[['unix_timestamp'], 'INT', ['TIMESTAMP'], '_ZN6impala18TimestampFunctions4UnixEPN10impala_udf15FunctionContextERKNS1_12TimestampValE'],
|
|
[['unix_timestamp'], 'INT', ['STRING', 'STRING'], '_ZN6impala18TimestampFunctions4UnixEPN10impala_udf15FunctionContextERKNS1_9StringValES6_',
|
|
'_ZN6impala18TimestampFunctions22UnixAndFromUnixPrepareEPN10impala_udf15FunctionContextENS2_18FunctionStateScopeE',
|
|
'_ZN6impala18TimestampFunctions20UnixAndFromUnixCloseEPN10impala_udf15FunctionContextENS2_18FunctionStateScopeE'],
|
|
[['from_unixtime'], 'STRING', ['INT'],
|
|
'_ZN6impala18TimestampFunctions8FromUnixIN10impala_udf6IntValEEENS2_9StringValEPNS2_15FunctionContextERKT_'],
|
|
[['from_unixtime'], 'STRING', ['INT', 'STRING'],
|
|
'_ZN6impala18TimestampFunctions8FromUnixIN10impala_udf6IntValEEENS2_9StringValEPNS2_15FunctionContextERKT_RKS4_',
|
|
'_ZN6impala18TimestampFunctions22UnixAndFromUnixPrepareEPN10impala_udf15FunctionContextENS2_18FunctionStateScopeE',
|
|
'_ZN6impala18TimestampFunctions20UnixAndFromUnixCloseEPN10impala_udf15FunctionContextENS2_18FunctionStateScopeE'],
|
|
[['from_unixtime'], 'STRING', ['BIGINT'],
|
|
'_ZN6impala18TimestampFunctions8FromUnixIN10impala_udf9BigIntValEEENS2_9StringValEPNS2_15FunctionContextERKT_'],
|
|
[['from_unixtime'], 'STRING', ['BIGINT', 'STRING'],
|
|
'_ZN6impala18TimestampFunctions8FromUnixIN10impala_udf9BigIntValEEENS2_9StringValEPNS2_15FunctionContextERKT_RKS4_',
|
|
'_ZN6impala18TimestampFunctions22UnixAndFromUnixPrepareEPN10impala_udf15FunctionContextENS2_18FunctionStateScopeE',
|
|
'_ZN6impala18TimestampFunctions20UnixAndFromUnixCloseEPN10impala_udf15FunctionContextENS2_18FunctionStateScopeE'],
|
|
[['now', 'current_timestamp'], 'TIMESTAMP', [], '_ZN6impala18TimestampFunctions3NowEPN10impala_udf15FunctionContextE']
|
|
]
|