title: SemanticException [Error 10043]: Either list of columns or a custom serializer should be specified
body: <p>I wrote an HiveQL code for finding the count of yes responses and also the cumulative count of them.</p>
  
  <pre><code>ADD JAR ${nameNode}/user/user1/input-data/BDEDefault/hive-data/jar/BDEHiveAvroSerde-0.1.0.jar;
  ADD JAR ${nameNode}/user/user1/input-data/BDEDefault/hive-data/jar/openx-hive-json-serde.jar;
  ADD JAR ${nameNode}/user/user1/input-data/BDEDefault/hive-data/jar/BDEHiveXMLSerde-0.1.0.jar;
  ADD JAR ${nameNode}/user/user1/input-data/BDEDefault/hive-data/jar/opencsv-2.0.jar;
  ADD JAR ${nameNode}/user/user1/input-data/BDEDefault/hive-data/jar/hive-csv-serde.jar;
  
  DROP TABLE IF EXISTS tmp_LRchart1;
  
  CREATE TABLE  tmp_LRchart1
  AS
  SELECT R.campid, R.CampNum, R.Count, R.Legend from
  (
      Select campid, Cast(campid as int) as CampNum, count(emailres) as Count, 'Email Response Count' as Legend from campdataderivedcol where emailres='Y' group by campid Order By CampNum
      Union All
      Select campid, Cast(campid as int) as CampNum, count(dmailres) as Count, 'Dmail Response Count' as Legend from campdataderivedcol where dmailres='Y' group by campid Order By CampNum
      Union All
      Select campid, Cast(campid as int) as CampNum, count(catres) as Count, 'Catalog Response Count' as Legend from campdataderivedcol where catres='Y' group by campid Order By CampNum
      Union All
      Select campid, Cast(campid as int) as CampNum, count(mobres) as Count, 'Mobile Response Count' as Legend from campdataderivedcol where mobres='Y' group by campid Order By CampNum
      Union All
      Select campid, Cast(campid as int) as CampNum,count(socres) as Count, 'Social Response Count' as Legend from campdataderivedcol where socres='Y' group by campid Order By CampNum
      Union All
      Select campid, Cast(campid as int) as CampNum, count(webres) as Count, 'Web Ads Response Count' as Legend from campdataderivedcol where webres='Y' group by campid Order By CampNum
  )R;
  
  DROP TABLE IF EXISTS LR_Charts;
  
  CREATE TABLE IF NOT EXISTS LR_Charts;
  
  INSERT INTO TABLE LR_Charts 
      select campid,CampNum,Count,Legend from tmp_LRchart1 Order By CampNum;
  
  ALTER TABLE LR_Charts ADD COLUMNS (CountCumm  INT);
  
  Select tmp_LRchart1.campid, tmp_LRchart1.Count, SUM(LR_Charts.Count) as
   LR_Charts.CountCumm from tmp_LRchart1, LR_Charts where tmp_LRchart1.campid &gt;= LR_Charts.campid group by tmp_LRchart1.campid order by tmp_LRchart1.campid;
  
  DROP TABLE IF EXISTS LR_STACK;
  
  CREATE TABLE IF NOT EXIST LR_STACK
  ROW FORMAT SERDE 'com.infosys.bdh.hive.serde.avro.BDHAvroSerDe'
  WITH SERDEPROPERTIES ('avro.schema.literal'='${outputSchema}')
  STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat' 
  OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat' LOCATION '${OUTPUT}';
  
  INSERT INTO TABLE LR_STACK
      select campid,CampNum,Count,Legend,CountCumm from LR_Charts Order By CampNum;
  </code></pre>
  
  <p>It uses a different environment so inclusion of Jar files is necessary and also part with the LR_STACK is correct (checked it by running that part separately). tmp_LRcharts1 is also getting created and showing the correct output.
  Just the part with creation of LR_Charts (with Alter table) and the query used for calculating the cumulative count(CummCount) is throwing an error.</p>
  
  <p>So basically, I am doing something wrong in this section of the query file:</p>
  
  <pre><code>INSERT INTO TABLE LR_Charts 
  select campid,CampNum,Count,Legend from tmp_LRchart1 Order By CampNum;
  
  ALTER TABLE LR_Charts ADD COLUMNS (CountCumm  INT);
  
  Select tmp_LRchart1.campid, tmp_LRchart1.Count, SUM(LR_Charts.Count) as LR_Charts.CountCumm from tmp_LRchart1, LR_Charts where tmp_LRchart1.campid &gt;= LR_Charts.campid group by tmp_LRchart1.campid order by tmp_LRchart1.campid;
  </code></pre>
  
  <p>Kindly help.</p>