SynthType.cpp

Clone Tools
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
[TRAFODION-3300] Fix overflow issues with extreme big nums + ROUND

  1. … 15 more files in changeset.
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.
Library manager fixes and LOB alter fix

  1. … 9 more files in changeset.
PR-1677 TRAFODION-3146 Support ANSI OVERLAY function

  1. … 4 more files in changeset.
Merge [TRAFODION-3155] PR 1658 Implement OVERLAPS predicate

  1. … 2 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/generator/GenPreCode.cpp modified: core/sql/optimizer/BindItemExpr.cpp modified: core/sql/optimizer/ItemExpr.cpp modified: core/sql/optimizer/ItemFunc.h modified: core/sql/optimizer/SynthType.cpp modified: core/sql/parser/sqlparser.y modified: core/sql/regress/qat/eqatddl06 modified: core/sql/regress/qat/eqatddl09 modified: core/sql/regress/qat/eqatdml03 modified: core/sql/regress/qat/qatddl00 modified: core/sql/regress/qat/qatddl06 modified: core/sql/regress/qat/qatddl09 modified: core/sql/regress/qat/qatdml03

  1. … 12 more files in changeset.
Merge branch 'master' of https://github.com/apache/trafodion into TRAFODION-3147

  1. … 7 more files in changeset.
[TRAFODION-3147] support sys_guid function

  1. … 7 more files in changeset.
modified: core/sql/bin/SqlciErrors.txt modified: core/sql/exp/ExpErrorEnums.h modified: core/sql/exp/exp_function.cpp modified: core/sql/optimizer/SynthType.cpp modified: core/sql/regress/core/EXPECTED038.LINUX modified: docs/messages_guide/src/asciidoc/_chapters/binder_msgs.adoc modified: docs/messages_guide/src/asciidoc/_chapters/executor_msgs.adoc

  1. … 6 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.
add nonreserved_word and tests

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

  1. … 10 more files in changeset.
[TRAFODION-3043] Add missing binder check for DATE_PART function

  1. … 1 more file in changeset.
Merge remote branch 'origin/pr/1503/head' into merge_1503

  1. … 8 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.
Performance changes for LOB and increasing limit for larger varchars/bobs to use with batch input.

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

  1. … 11 more files in changeset.
[TRAFODION-2157] fix various issues

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

  1. … 15 more files in changeset.
[TRAFODION-2951] group_concat on utf8 column with chinese character get messy code

[TRAFODION-2768] Make Trafodion code base to compile in RH7

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

  1. … 392 more files in changeset.
lcov: commit #1

  1. … 333 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.
[TRAFODION-2727] Memory leak in the compiler part of the code in Trafodion

Compiler objects were refactored to use the heap infrastructure to ensure

that it is accounted and allocated within the trafodion memory management.

The commonly used NAType and derived classes are mostly created via heap,

but the heap was not passed in the constructor. The embedded objects

used the system heap though the container object is allocated in the compiler

heap. This could result in memory leak when the container object is

destroyed.

  1. … 63 more files in changeset.
Few fixes, details listed below.

-- fix an issue where multiple values inserted from a list would return

error but each value inserted on its own would succeed.

ex: create table ts (a timestamp);

insert into ts values ('2017-01-01 10:10:10'), ('2018-01-01 10:10:10');

-- sometimes errors returned from child during hive inserts were not

being returned. That has been fixed.

-- TRAFODION-2683 extension.

added a 'p' (prune) option which would cleanse and filter unneeded

explain output. This helps in reducing output especially

for larger explains.

Ex:

>>explain option 'p' select * from dual;

------------------------------------------------------ PLAN SUMMARY

STATEMENT_NAME ........... NOT NAMED

STATEMENT ................ select * from dual;

------------------------------------------------------- NODE LISTING

ROOT ====================================== SEQ_NO 2 ONLY CHILD 1

DESCRIPTION

fragment_id ............ 0

parent_frag ............ (none)

fragment_type .......... master

xn_access_mode ......... read_only

auto_query_retry ....... enabled

embedded_arkcmp ........ used

select_list ............ %(0)

input_variables ........ %(0), %(0), %(0)

VALUES ==================================== SEQ_NO 1 NO CHILDREN

DESCRIPTION

fragment_id ............ 0

parent_frag ............ (none)

fragment_type .......... master

tuple_expr ............. %(0)

--- SQL operation complete.

>>

  1. … 19 more files in changeset.
Multiple fixes: REPLACE func maxlen, hbase unregister, DDLExpr cleanup

-- REPLACE function max length is no longer limited to 32K

-- HBase object unregister was not working correctly. That is fixed.

-- class DDLExpr has been cleaned up to have one constructor for all cases.

All options are now set using flags instead of constructor params.

-- "showddl <tab>, explain " command now returns an error instead of crash.

  1. … 10 more files in changeset.
[TRAFODION-2634] Change return type of FLOOR/CEIL to an integer type

  1. … 6 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.