hs_cli.h

Clone Tools
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Misleading error when Hivestats can't be created

When Update Statistics is performed on a Hive table, the

trafodion.hivestats schema is created if it doesn't already

exist. If the user issuing the ustat statement does not

have the create_schema component privilege, this will fail, but

the code as it existed ignored the error, assuming it was

a "schema already exists" error, which is expected in most

cases. If the schema does not exist, an error is then given

when an attempt is made to create the histograms table in

the non-existing schema.

This has been changed to check the error when the schema

creation attempt fails, so the correct error is generated.

This is a partial fix, because a user with manage_statistics

privilege should not be prevented from executing Update

Statistics just because the trafodion.hivestats schema did

not already exist. The likely full solution would be to

create the schema automatically at Trafodion initialization.

Change-Id: I26561100bab9f6a59f3f5d0d56ce9d2aab380fa3

Partial-Bug: #1425748

  1. … 4 more files in changeset.
Automated collection of necessary statistics

When the optimizer requests a histogram for a given column, and that

histogram does not exist, it may (depending on the cqds in effect) register

a request for the histogram to be created at a later time, or utilize a

small sample to generate a rudimentary histogram on the fly. In either

case, when a subsequent Update Statistics statements specifies the ON

NECESSARY COLUMNS clause, any column of the target table that has been

the subject of one of these actions will have a bona fide histogram

created.

blueprint ustat-automation

Change-Id: Ieceac3e1d84bf8091a5bf340dc1739a447ad2436

  1. … 6 more files in changeset.
enable embedded compiler support for fetch histogram queries

The fetch histogram logic executes queries against the user metadata

tables HISTOGAMS and HISTORAGM_INTERVALS that require the spawning of

external arkcmp processes. The work in this check-in enables embedded

compiler for these queries so the spawning of external arkcmps is avoided.

The change introduces a "switch context" to a meta data context when

compiling the user metadata queries and "switch back" to the user context

prior to fetching the rows from the cursors on the user metadata tables.

The main change is implemented in the "readHistogram" function in

hs_read.cpp file.

A new method (switchBackContext) was added to class CmpContext class

to enable switching back to a previous context. The purpose of the new

method is to ensure that thread globals are appropriately reset when

reverting back to a previous context.

The checkin also turns OFF CQD HBASE_SERIALIZATION in file regress/tools/sbdefs

as the hbase serialization feature is not enabled yet. The feature (CQD)

was enabled during regression testing prior to this checkin.

Change-Id: Iee1b8152dee3fea0ce3d3354719b5b7aa8fb198f

  1. … 12 more files in changeset.
Initial code drop of Trafodion

  1. … 4886 more files in changeset.