trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hzel...@apache.org
Subject [1/2] incubator-trafodion git commit: [TRAFODION-2219] charsets regression failures and retrieved columns
Date Wed, 14 Sep 2016 04:59:48 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 057ae469c -> c246f49ec


[TRAFODION-2219] charsets regression failures and retrieved columns

Fixed a problem with occasional failures of regressions, due to
non-deterministic order of results.

Also changed the way we show the number of "retrieved columns" for
Hive and ORC scans. The EXPLAIN now only shows the number of
actually needed columns, not all of them.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/cda727ac
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/cda727ac
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/cda727ac

Branch: refs/heads/master
Commit: cda727ac3615543abf5558c2d87b9bce4dda206c
Parents: 2980764
Author: Hans Zeller <hzeller@apache.org>
Authored: Tue Sep 13 20:33:45 2016 +0000
Committer: Hans Zeller <hzeller@apache.org>
Committed: Tue Sep 13 20:33:45 2016 +0000

----------------------------------------------------------------------
 core/sql/generator/GenExplain.cpp     | 3 +--
 core/sql/generator/GenRelScan.cpp     | 2 ++
 core/sql/optimizer/RelScan.h          | 5 +++++
 core/sql/regress/charsets/EXPECTED310 | 4 ++--
 core/sql/regress/charsets/EXPECTED311 | 4 ++--
 core/sql/regress/charsets/TEST310     | 4 ++--
 core/sql/regress/charsets/TEST311     | 4 ++--
 7 files changed, 16 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/cda727ac/core/sql/generator/GenExplain.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenExplain.cpp b/core/sql/generator/GenExplain.cpp
index 8b1d7a7..6ac7c43 100644
--- a/core/sql/generator/GenExplain.cpp
+++ b/core/sql/generator/GenExplain.cpp
@@ -570,8 +570,7 @@ FileScan::addSpecificExplainInfo(ExplainTupleMaster *explainTuple,
   // now get columns_retrieved
   description += "columns_retrieved: ";
   char buf[27];
-  //sprintf(buf, "%d ", retrievedCols().entries());
-  sprintf(buf, "%d ", getIndexDesc()->getIndexColumns().entries());
+  sprintf(buf, "%d ", retrievedCols().entries());
   description += buf;
 
   // now get the probe counters

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/cda727ac/core/sql/generator/GenRelScan.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenRelScan.cpp b/core/sql/generator/GenRelScan.cpp
index 4cb64fd..87f2cd7 100644
--- a/core/sql/generator/GenRelScan.cpp
+++ b/core/sql/generator/GenRelScan.cpp
@@ -758,6 +758,8 @@ short FileScan::codeGenForHive(Generator * generator)
     
   }
 
+  setRetrievedCols(neededHdfsVals);
+
   ex_expr *executor_expr = 0;
   ex_expr *proj_expr = 0;
   ex_expr *convert_expr = 0;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/cda727ac/core/sql/optimizer/RelScan.h
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/RelScan.h b/core/sql/optimizer/RelScan.h
index ee596ed..da90691 100644
--- a/core/sql/optimizer/RelScan.h
+++ b/core/sql/optimizer/RelScan.h
@@ -1023,6 +1023,11 @@ public:
 
   Int32 getComputedNumOfActivePartiions()  const { return computedNumOfActivePartitions_;
}
 
+protected:
+
+  void setRetrievedCols(const ValueIdSet &retrievedCols)
+                                           { retrievedCols_ = retrievedCols; }
+
 private:
 
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/cda727ac/core/sql/regress/charsets/EXPECTED310
----------------------------------------------------------------------
diff --git a/core/sql/regress/charsets/EXPECTED310 b/core/sql/regress/charsets/EXPECTED310
index 853faca..58e1468 100644
--- a/core/sql/regress/charsets/EXPECTED310
+++ b/core/sql/regress/charsets/EXPECTED310
@@ -101,7 +101,7 @@ u1u1
 *** ERROR[8822] The statement was not prepared.
 
 >>--
->>select * from cs310t2, cs310t1 order by 1;
+>>select * from cs310t2, cs310t1 order by 1,2;
 
 U1                A1      
 ----------------  --------
@@ -406,7 +406,7 @@ u1u1
 >>--
 >>-- Tests for basic SQL functions
 >>--
->>select * from cs310t3, cs310t4 order by 1;
+>>select * from cs310t3, cs310t4 order by 1,2;
 
 A1        U1              
 --------  ----------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/cda727ac/core/sql/regress/charsets/EXPECTED311
----------------------------------------------------------------------
diff --git a/core/sql/regress/charsets/EXPECTED311 b/core/sql/regress/charsets/EXPECTED311
index 1f9d20d..6d004e0 100644
--- a/core/sql/regress/charsets/EXPECTED311
+++ b/core/sql/regress/charsets/EXPECTED311
@@ -101,7 +101,7 @@ u1u1
 *** ERROR[8822] The statement was not prepared.
 
 >>--
->>select * from cs311t2, cs311t1 order by 1;
+>>select * from cs311t2, cs311t1 order by 1,2;
 
 U1                A1      
 ----------------  --------
@@ -406,7 +406,7 @@ u1u1
 >>--
 >>-- Tests for basic SQL functions
 >>--
->>select * from cs311t3, cs311t4 order by 1;
+>>select * from cs311t3, cs311t4 order by 1,2;
 
 A1        U1              
 --------  ----------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/cda727ac/core/sql/regress/charsets/TEST310
----------------------------------------------------------------------
diff --git a/core/sql/regress/charsets/TEST310 b/core/sql/regress/charsets/TEST310
index 773c5a5..b89855a 100644
--- a/core/sql/regress/charsets/TEST310
+++ b/core/sql/regress/charsets/TEST310
@@ -73,7 +73,7 @@ select ascii( _ucs2'a') from cs310t1 order by 1;
 select ascii(u1) from cs310t2 order by 1;
 select ascii( TRANSLATE(_iso88591'abcdefghijklmnop' using Iso88591ToUCS2) ) from cs310t2
order by 1;
 --
-select * from cs310t2, cs310t1 order by 1;
+select * from cs310t2, cs310t1 order by 1,2;
 select * from cs310t2, cs310t1 where 'a' = CHAR(ASCII('a1a1')) order by 1,2; -- SEE NOTE
ABOVE
 select * from cs310t2, cs310t1 where 'u' = CHAR(ASCII('u1u1'),UCS2) order by 1,2; -- SEE
NOTE ABOVE
 select * from cs310t2, cs310t1 where 'u' = lower(CHAR(ASCII(upper(a1)))) order by 1,2; --
SEE NOTE ABOVE
@@ -117,7 +117,7 @@ select * from cs310t3 union all (select * from cs310t4) order by 1;
 --
 -- Tests for basic SQL functions
 --
-select * from cs310t3, cs310t4 order by 1;
+select * from cs310t3, cs310t4 order by 1,2;
 select * from cs310t3, cs310t4 where a1 = case when a1 > 'a1a' then u1 else 'a100' end
order by 1,2;
 select * from cs310t3, cs310t4 where a1 = case when a1 > 'a1a' then 'a1a1' else 'a100'
end order by 1,2;
 select * from cs310t3, cs310t4 where a1 = coalesce(cast(NULL as varchar(8) character set
ISO88591), u1, a1) order by 1,2;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/cda727ac/core/sql/regress/charsets/TEST311
----------------------------------------------------------------------
diff --git a/core/sql/regress/charsets/TEST311 b/core/sql/regress/charsets/TEST311
index 3281a10..759895d 100644
--- a/core/sql/regress/charsets/TEST311
+++ b/core/sql/regress/charsets/TEST311
@@ -74,7 +74,7 @@ select ascii( _ucs2'a') from cs311t1 order by 1;
 select ascii(u1) from cs311t2 order by 1;
 select ascii( TRANSLATE(_iso88591'abcdefghijklmnop' using Iso88591ToUCS2) ) from cs311t2
order by 1;
 --
-select * from cs311t2, cs311t1 order by 1;
+select * from cs311t2, cs311t1 order by 1,2;
 select * from cs311t2, cs311t1 where 'a' = CHAR(ASCII('a1a1')) order by 1,2; -- SEE NOTE
ABOVE
 select * from cs311t2, cs311t1 where 'u' = CHAR(ASCII('u1u1'),UCS2) order by 1,2; -- SEE
NOTE ABOVE
 select * from cs311t2, cs311t1 where 'u' = lower(CHAR(ASCII(upper(a1)))) order by 1,2; --
SEE NOTE ABOVE
@@ -118,7 +118,7 @@ select * from cs311t3 union all (select * from cs311t4) order by 1;
 --
 -- Tests for basic SQL functions
 --
-select * from cs311t3, cs311t4 order by 1;
+select * from cs311t3, cs311t4 order by 1,2;
 select * from cs311t3, cs311t4 where a1 = case when a1 > 'a1a' then u1 else 'a100' end
order by 1,2;
 select * from cs311t3, cs311t4 where a1 = case when a1 > 'a1a' then 'a1a1' else 'a100'
end order by 1,2;
 select * from cs311t3, cs311t4 where a1 = coalesce(cast(NULL as varchar(8) character set
ISO88591), u1, a1) order by 1,2;


Mime
View raw message