Clone Tools
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-3118 Improve on parts of EXTRACT

  1. … 10 more files in changeset.
[TRAFODION-3097] At times the query involving sequence function fail and dumps core

BiArithmetic sum expression clause in Sequence expression can't have

pcode generated like an arithmetic expression that supports augmented

assignment operation such as a += b.

  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.


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


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


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


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

during backpatching.


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

in some cases. That has been fixed.


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


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


-- 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-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


-- older sqlcat ReadTableDef


-- 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_NEW_PHANDLE

-- removed __EID

-- removed ARKFS_OPEN

-- removed STAND_ALONE

-- removed __TANDEM

-- removed NA_C89

-- removed NA_NSK


-- 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 ERROR

-- removed ERROR_STATE


Contents of these files have been removed.

Next checkin fill remove the files itself from git:


executor/ExMeas.h, ExMeas.cpp

executor/tempfile.h, .cpp


executor/stubs.cpp, stubs2.cpp


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












sqlcat/ReadTableDef.h, cpp

sqlcat/readRealArk.h, cpp

  1. … 460 more files in changeset.
jira TRAFODION-2246 Add support for GROUP BY ROLLUP feature


select item1, item2... from ... group by rollup (v1,...,vn)

Restrictions related to grouby rollup usage and query transformations

listed below. Some may be lifted in later checkins:

-- grouping column list must not have duplicate entries

-- aggrs must be min/max/sum/avg/count/count(*)

-- distinct aggregates are not supported

-- grouping columns/values must be nullable.

To group on a non-nullable item, use function

CAST(v as nullable).

This will convert v to nullable, if needed.

-- HAVING predicate will not be pushed down to scan predicate.

-- group by in a subquery will not be eliminated

-- grouping comparison predicate does not use pcode

-- group by rollup cannot be replaced by primary key

-- groupby will be done using sortgroupby since ordering is needed to

materialize rollup groups.

-- rollup groupby will be done at root (master root or esp root). This

is needed to detect rollup group changes across the whole result set.

-- since groupby can materialize new null rows for rollup groups,

a final sort operator is needed to be added after groupy even

if sortgroupby has already guaranteed that it gets rows in order.

Rollup computation logic is discussed in file executor/ex_sort_grby.cpp

prior to ex_sort_grby_rollup_tcb::work method.

See regress/seabase/TEST033 for tests of various 'group by rollup'


  1. … 16 more files in changeset.
groupby rollup commit #1

  1. … 31 more files in changeset.
showplan enhancement to display expr instruction

display the instruction enum being generated in

text format.

Output will include the instruction and look like:

Clause #2: ex_arith_clause


instruction: ADD_BIN16S_BIN16S_BIN16S(0), instrArrayIndex_: 0

Clause #1: ex_comp_clause

OperatorTypeEnum = ITM_GREATER(2024), NumOperands = 3


instruction: GT_BIN32S_BIN16S(40), instrArrayIndex_: 218

In addition, some cleanup has been done in expression


  1. … 22 more files in changeset.
Various fixes, details listed below

--error message returned during string to float conversion error was not

correct. That has been fixed.

-- ordering was not getting set correctly during key encoding.

-- stored descriptor was not getting stored correctly if

the generated length was exactly 10000 bytes (max length of TEXT.text col).

-- time part of european date format is now handled correctly

by using '.' as delimiter instead of ':'

-- repeat function was crashing if specified maxlength was not sufficient

to hold the result. It now returns an overflow error.

-- tinyint key columns were not handling the case of overflow/underflow

when used in a key predicate. That has been fixed.

-- Numeric datatype with precision less than 3 is now created as tinyint

and handled in expressions.

-- some non-tinyint datatypes(float, decimal) were not being handled

correctly when converted to tinyint. That has been fixed.

-- some more pcode instructions involving tinyint range check and

conversions have been added.

  1. … 30 more files in changeset.
JIRA TRAFODION-2099 Add support for boolean datatype

-- boolean datatype support in create, cast and params


create table t (a boolean);

insert into t values (true), (false);

select * from t where a = true;

-- boolean datatype support for hive columns

-- unarith op support. Currently used for '!' operator that

negates a boolean value.

Ex: select * from t where !a = false;

-- support for more tinyint and largeint unsigned conversion/comparison

operations in expressions and pcode

-- some code cleanup: removed reference to downrev compiler code genration

-- create table if not exists as select... syntax support

-- regress/seabase/TEST003 updated with additional tests

  1. … 81 more files in changeset.
JIRA TRAFODION-2060 Add support for tinyint datatype

-- added support for tinyint datatype to be used in create

and cast statements

-- added support for returning tinyint in select list and

input params

-- currently tinyint select list and input params is only enabled for

queries from sqlci. Some support for it has been added to jdbc T4

but need to be completed. Until then, tinyint select/param support

is not enabled for t4/t2/odbc interfaces

-- removed obsolete tandem floating point datatypes

  1. … 62 more files in changeset.
[TRAFODION-1920] disable pCode for ex_conv_clause

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
    • +4905
  1. … 10768 more files in changeset.
Move core into subdir to combine repos

    • -0
    • +4899
  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
    • +4905
  1. … 10837 more files in changeset.