exp_function.h

Clone Tools
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
jira TRAFODION-3157 Add support for BINARY/VARBINARY datatype

Spec attached to jira.

new test regress/seabase/TEST004 added.

  1. … 86 more files in changeset.
[TRAFODION-2952] large amount of data will cause error in sequence generating

  1. … 8 more files in changeset.
TRAFODION-3146 Support ANSI OVERLAY function

OVERLAY modifies a source string by replacing a given

substring of the string, which is specified by a given numeric starting

position and a given numeric length, with a replacement string).

When the length of the substring is zero, nothing is removed

from the source string and the string returned by the function is the

result of inserting the replacement string into the source string at the

starting position.

STUFF is syntactic variation of OVERLAY.

Example:

overlay ('source original string' placing 'modified ' from 8 for 9)

stuff ('source original string', 8, 9, 'modified ')

will return:

'source modified string'

overlay ('source original string' placing 'modified ' from 8 for 0)

will return:

'source modified original string'

  1. … 13 more files in changeset.
modified: core/sql/bin/SqlciErrors.txt modified: core/sql/common/OperTypeEnum.h modified: core/sql/exp/ExpPackDefs.cpp modified: core/sql/exp/exp_clause.cpp modified: core/sql/exp/exp_clause.h modified: core/sql/exp/exp_function.cpp modified: core/sql/exp/exp_function.h modified: core/sql/generator/GenItemFunc.cpp modified: core/sql/optimizer/ItemExpr.cpp modified: core/sql/optimizer/ItemFunc.h modified: core/sql/optimizer/SynthType.cpp modified: core/sql/parser/ParKeyWords.cpp modified: core/sql/parser/sqlparser.y modified: core/sql/regress/core/EXPECTED038.LINUX modified: core/sql/regress/core/TEST038 modified: docs/messages_guide/src/asciidoc/_chapters/binder_msgs.adoc

  1. … 15 more files in changeset.
trafodion-3118 Improve on parts of EXTRACT

  1. … 10 more files in changeset.
various fixes

-- JIRA 2980 support for INSTR function.

INSTR(source_string, pattern, startPos, occurrence)

Search for pattern in source_string.

Start at startPos'th character. Optional, default 1

Return occurrence'th occurrence. Optional, default 1

(exp/exp_function.cpp/h, exp/ExpPCodeClauseGen.cpp,

generator/GenItemFunc.cpp, optimizer/BindItemExpr.cpp, ItemExpr.cpp,

optimizer/ItemFunc.h, SynthType.cpp, parser/sqlparser.y)

-- hivemd returns precision, scale, display_datatype

(comexe/ComTdbExeUtil.h, common/BaseTypes.cpp,NAType.cpp/h,

executor/ExExeUtilGet.cpp, ExExeUtil.h)

-- hive decimal type is treated as sql NUMERIC for performance.

(common/NAType.cpp)

-- hive select from hivemd with prepare and multiple executes work

(executor/ExExeUtilGet.cpp)

-- fix for crash in sql buffer pool when allocating large size rows.

(executor/sql_buffer.cpp)

-- SIGN(op) now returns error if op is not numeric

(BindItemExpr.cpp)

-- strings of length zero are no longer cached. Caching them causes problem

during backpatching.

(optimizer/ItemCache.cpp)

--- compile time predicates on constants were not being created correctly

in some cases. That has been fixed.

(ValueDesc.cpp)

-- trim now supported on scaled numeric, float and bignum datatypes

(BindItemExpr.cpp)

-- CASE is now supported on scaled numerics, float, bignum

(BindItemExpr.cpp)

-- char_length is now supported on numerics

(ItemFunc.h, BindItemExpr.cpp)

-- DAYOFMONTH now allowed only on datetime datatypes

(common/OperTypeEnum.h, sqlparser.y, BindItemExpr.cpp, ItemExpr.cpp)

-- TO_TIME now allowed only on 'datetime with time' or character datatypes.

(BindItemExpr.cpp, bin/SqlciErrors.txt)

-- updated expected file for compGeneral/test042

  1. … 31 more files in changeset.
[TRAFODION-2157] add MySQL function unix_timestamp,uuid,sleep

  1. … 15 more files in changeset.
TRAFODION-2731 CodeCleanup: Phase 4. Remove legacy/obsolete pragmas

  1. … 392 more files in changeset.
TRAFODION-2731 CodeCleanup: Remove obsolete, legacy and unused code

This phase handles the following:

-- removal of code that dealt with:

-- mpalias, NSK, MP, mploc, resource fork, rfork

-- ARLIB, DISK, VOLUME, PFS, compiler version info

-- interpretasrow/IAR, AuditImage, ExtractColumns functions

-- ARKCMP_SINGLE_PROCESS and oneProcess()

-- recompControl, remoteDefaults, rtdu, module

-- latebind thru nsk defines, guardian names, nametype nsk

-- SHADOW implementation

-- MEASURE

-- older sqlcat ReadTableDef

-- DP2_MEMORY, DP2_SPACE, HGB_DP2_MEMORY_LIMIT

-- internal cli methods no longer used by any caller

Code within the following defines is removed if it is obsolete

or the define itself is removed if that feature is always on:

-- removed NA_EIDPROC

-- removed SQLEXP_LIB_FUNC

-- removed NA_CMPDLL

-- removed SQ_PHANDLE_VERIFIER

-- removed SQ_NEW_PHANDLE

-- removed __EID

-- removed ARKFS_OPEN

-- removed STAND_ALONE

-- removed __TANDEM

-- removed NA_C89

-- removed NA_NSK

-- removed SQLEXPORT_LIB_FUNC

-- removed SQLCLI_LIB_FUNC

-- removed CLI_PRIV_SRL

-- removed PRIV_SRL

-- removed NA_LINUX

-- removed NA_HSC_LINUX

-- removed NA_UNIX

-- removed NA_WINNT

-- removed HAVE_MMAP

-- removed NA_NO_C_RUNTIME

-- removed NA_DEBUG_C_RUNTIME(replaced with _DEBUG)

-- removed NA_64BIT usage except in sqlcli.h

-- removed dg64

-- removed SQLEXPORT_LIB

-- removed NA_ARKFS

-- removed NA_IEEE_FLOAT

-- removed NA_GUARDIAN_MSG

-- removed NA_HSC

-- removed NA_TMFNOTYETSUPPORTED

-- removed ERROR

-- removed ERROR_STATE

-- removed SQLERRORS_LIB_FUNC

Contents of these files have been removed.

Next checkin fill remove the files itself from git:

executor/dmeasql.h

executor/ExMeas.h, ExMeas.cpp

executor/tempfile.h, .cpp

executor/rcb.h

executor/stubs.cpp, stubs2.cpp

exp/srlversion.cpp

cli/rtdu.h, rtdu2.h, rtdu.cpp, rtdu.cpp

cli/VicKeyValuePair.h

cli/CliDll.cpp

cli/CliStubsStaticBuild.cpp

cli/globalsrlversion.cpp

cli/globalstubs.cpp

cli/sqlciSRLStubs.cpp

cli/test.cpp

cli/privsrlversion.cpp

common/SqlExpDllDefines.h

common/SqlExportDllDefines.h

sqlcat/enum.h

sqlcat/ReadTableDef.h, cpp

sqlcat/readRealArk.h, cpp

  1. … 460 more files in changeset.
JIRA 2485,2540,2582,2591, plus other bug fixes

[TRAFODION-2485] Add support for REVERSE function

(OperTypeEnum.h, exp/*, sqlparser.y,

BindItemExpr.cpp, ItemExpr.cpp, SynthType.cpp,

GenItemFunc.cpp)

[TRAFODION-2540] Alter Drop column on table with identity

"generated always" fails

(file CmpSeabaseDDLtable.cpp)

[TRAFODION-2582] "timestamp - timestamp" returns "days" instead of "seconds"

(file: BindItemExpr.cpp)

[TRAFODION-2591] Create index on added column returns incorrect results.

(file generator/GenRelScan.cpp)

Bug: Invalid "set transaction" stmt syntax no longer causes assertion failure

or abend. An error is issued instead.

(file BindRelExpr.cpp)

Bug: Hive inserts with mismatched tgt/src datatypes would sometimes do not

insert or insert incorrect values.

(file GenFastTransport.cpp)

Bug: an error indication is now returned if buildEncodeTree method is

called to encode a "NULL" value for a non-null column.

(file EncodedKeyValue.cpp)

hive/TEST007 now does initialize auth and register user

  1. … 25 more files in changeset.
[TRAFODION-2477] Invalid characters in translation are ignored

Right now we ignore such invalid characters and also may truncate

the string at the point of the invalid char. The expected behavior

would be an error.

The only type of invalid data I could create with regular SQL syntax

is an invalid UTF-16 surrogate pair. We have no checks that detect

those when we enter the data. Invalid UTF-8, on the other hand, is

rejected when we try to insert it in the database (at least in the

case I tried).

The fix adds a check to generate an error (file conversionLocale.cpp).

It also adds two CQDs to suppress the error (remaining code files)

and to replace the invalid character with a replacement character.

Right now we use "?", even for Unicode, which has a special replacement

character, see TRAFODION-2515.

  1. … 7 more files in changeset.
[TRAFODION-2228]Add AES_ENCRYPT/AES_DECRYPT functions

Add two functions which used to encrypt and decrypt the data using the

official AES (Advanced Encryption Standard) algorithm.

AES_ENCRYPT(str, key_str[, init_vector])

AES_DECRYPT(crypt_str, key_str[, init_vector])

Both these two function have optional init_vector argument which

provides an initalization vector for block encryption modes that

require it. For modes that require the optional init_vector argument, an error

occurs if init_vector is missing. For modes that don't need

init_vector, it will raise a unused argument waring if init_vector is

provided.

The new CQD block_encryption_mode controls the mode for

block-based

encryption algorithm. The default value is 0, which use

aes-128-ecb.

Here is the list for diffferent values for

block_encryption_mode

CQD value algorithm

0 aes-128-ecb

1 aes_192_ecb

2 aes_256_ecb

3 aes_128_cbc

4 aes_192_cbc

5 aes_256_cbc

6 aes_128_cfb1

7 aes_192_cfb1

8 aes_256_cfb1

9 aes_128_cfb8

10 aes_192_cfb8

11 aes_256_cfb8

12 aes_128_cfb128

13 aes_192_cfb128

14 aes_256_cfb128

15 aes_128_ofb

16 aes_192_ofb

17 aes_256_ofb

  1. … 21 more files in changeset.
fix conflicts

  1. … 12 more files in changeset.
return fixed length char for SHA2 function

  1. … 8 more files in changeset.
jira 2227

  1. … 21 more files in changeset.
Implement builtin function SOUNDEX

  1. … 12 more files in changeset.
second round of function support

  1. … 8 more files in changeset.
[TRAFODION-2229] add hashing functions, commit set 1

  1. … 10 more files in changeset.
[TRAFODION-2208] function support: log2,IS_IPV4,IS_IPV6 etc

  1. … 12 more files in changeset.
Various fixes (details below)

-- ddl_transactions cqd is now on by default.

All ddl, where allowed and supported, will run

within one transaction

-- drop schema has been disabled to run within one transaction.

When jira 1948 is fixed, it will be enabled.

-- hdfs scan handles hive col values > 32K

-- pcode handles varchar with len > 32K

-- errors (gaps, unsorted order) for cqd values in nadefaults are

detected without crashing arkcmp.

-- volatile and regular schema drop returns the reason if an error occured

(for ex: name of objects that could not be dropped)

-- dateformat displays european format correctly with a blank

seperator between date and time values

-- dateformat timestamp in usa format displayes time with AM/PM

-- dateformat inside a cast function returns correct values.

  1. … 19 more files in changeset.
Part 2 of changes to update license text in Trafodion source

This check-in updates license text in all source files in the

core/sql directory. Remaining directories will be done in

later check-ins.

  1. … 3147 more files in changeset.
Merge remote branch 'core/master'

  1. … 108 more files in changeset.
Move core into subdir to combine repos

    • -0
    • +3899
    ./exp_function.h
  1. … 10768 more files in changeset.
Move core into subdir to combine repos

    • -0
    • +3899
    ./exp_function.h
  1. … 10622 more files in changeset.
Move core into subdir to combine repos

Use: git log --follow -- <file>

to view file history thru renames.

    • -0
    • +3899
    ./exp_function.h
  1. … 10837 more files in changeset.