[ 
https://issues.apache.org/jira/browse/TRAFODION-3316?focusedWorklogId=274294&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-274294
 ]

ASF GitHub Bot logged work on TRAFODION-3316:
---------------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Jul/19 18:47
            Start Date: 09/Jul/19 18:47
    Worklog Time Spent: 10m 
      Work Description: nonstop-qfchen commented on pull request #1848: 
[TRAFODION-3316] Three fixes to UPDATE STATISTICS
URL: https://github.com/apache/trafodion/pull/1848#discussion_r301737064
 
 

 ##########
 File path: core/sql/ustat/hs_globals.cpp
 ##########
 @@ -4307,11 +4302,12 @@ Lng32 HSSample::make(NABoolean rowCountIsEstimate, // 
input
     // 2 cqds allow user control of these retries.
     Int32 centiSecs = getDefaultAsLong(USTAT_RETRY_DELAY);
     Int32 limit = getDefaultAsLong(USTAT_RETRY_LIMIT);
+    Int64 printPlan = 1;
     if (limit < 1 || centiSecs < 1) // user does not want any retry
 
 Review comment:
   Can we use NABoolean here through out?  It is a little bit more efficient 
than Int64 when pass to a function. 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 274294)
    Time Spent: 0.5h  (was: 20m)

> Fix some issues with incremental UPDATE STATISTICS
> --------------------------------------------------
>
>                 Key: TRAFODION-3316
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-3316
>             Project: Apache Trafodion
>          Issue Type: Improvement
>            Reporter: David Wayne Birdsall
>            Assignee: David Wayne Birdsall
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Fix some issues with incremental UPDATE STATISTICS.
>  # The Hive TIMESTAMP datatype has precision 9. When processing a Hive 
> TIMESTAMP column, UPDATE STATISTICS abends.
>  # After fixing that, when testing a small example, the sampling ratio for 
> the sample table is made incorrectly small, resulting in 9207 errors (sample 
> is empty).
>  # Sometimes, when populating the sample table, the UPSERT fails because 
> garbage is used for the table name. This is because the table name is taken 
> from an NAString that has gone out of scope.
> The following test script can be used to test these conditions. In Hive, do 
> the following:
> {quote}create database if not exists h_increUpdatestats;
> use h_increUpdatestats;
> drop table if exists hive_sequencefile ;
> create table hive_sequencefile(C_CUSTKEY int,C_NAME char(20),C_ADDRESS 
> varchar(20), C_NATIONKEY int, C_TIMESTAMP timestamp,C_PHONE char(20), 
> C_ACCTBAL string, 
> C_MKTSEGMENT char(20), C_DATE date) stored as sequencefile;
> insert into hive_sequencefile values 
> (1,'x','xx',1,'2018-08-22 12:00:00.123','xxx','xxxx','xxxxx','2018-08-22'),
> (2,'x','xx',2,'2018-08-23 12:00:00.123','xxx','xxxx','xxxxx','2018-08-23'),
> (3,'x','xx',3,'2018-08-24 12:00:00.123','xxx','xxxx','xxxxx','2018-08-24'),
> (4,'x','xx',4,'2018-08-25 12:00:00.123','xxx','xxxx','xxxxx','2018-08-25'),
> (5,'x','xx',5,'2018-08-26 12:00:00.123','xxx','xxxx','xxxxx','2018-08-26');
> {quote}
> Then in Trafodion do the following:
> {quote}update statistics for table hive.h_increUpdatestats.hive_sequencefile 
> remove sample;
> update statistics for table hive.h_increUpdatestats.hive_sequencefile create 
> sample random 100 percent;
> update statistics for table hive.h_increUpdatestats.hive_sequencefile on 
> every column;
> update statistics for table hive.h_increUpdatestats.hive_sequencefile on 
> existing columns incremental where C_CUSTKEY>=0;
> {quote}
> Without any fixes, the third UPDATE STATISTICS command abends.
> With a fix for the first problem, the last UPDATE STATISTICS command 
> sometimes fails with error 2109, and always fails with error 9207.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to