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

ASF GitHub Bot logged work on HIVE-26925:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Jan/23 16:11
            Start Date: 19/Jan/23 16:11
    Worklog Time Spent: 10m 
      Work Description: sonarcloud[bot] commented on PR #3939:
URL: https://github.com/apache/hive/pull/3939#issuecomment-1397226593

   Kudos, SonarCloud Quality Gate passed!    [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=3939)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3939&resolved=false&types=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3939&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3939&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3939&resolved=false&types=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3939&resolved=false&types=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3939&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3939&resolved=false&types=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3939&resolved=false&types=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3939&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3939&resolved=false&types=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3939&resolved=false&types=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3939&resolved=false&types=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=3939&metric=coverage&view=list)
 No Coverage information  
   [![No Duplication 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png
 'No Duplication 
information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=3939&metric=duplicated_lines_density&view=list)
 No Duplication information
   
   




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

    Worklog Id:     (was: 840358)
    Time Spent: 2h 20m  (was: 2h 10m)

> MV with iceberg storage format fails when contains 'PARTITIONED ON' clause 
> due to column number/types difference.
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-26925
>                 URL: https://issues.apache.org/jira/browse/HIVE-26925
>             Project: Hive
>          Issue Type: Bug
>          Components: Iceberg integration
>            Reporter: Dharmik Thakkar
>            Assignee: Krisztian Kasa
>            Priority: Critical
>              Labels: pull-request-available
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> MV with iceberg storage format fails when contains 'PARTITIONED ON' clause 
> due to column number/types difference.
> {code:java}
> !!! annotations iceberg
> >>> use iceberg_test_db_hive;
> No rows affected
> >>> set hive.exec.max.dynamic.partitions=2000;
> >>> set hive.exec.max.dynamic.partitions.pernode=2000;
> >>> drop materialized view if exists mv_agg_gby_col_partitioned;
> >>> create materialized view mv_agg_gby_col_partitioned PARTITIONED ON (t) 
> >>> stored by iceberg stored as orc tblproperties ('format-version'='1') as 
> >>> select b,f,sum(b), sum(f),t from all100k group by b,f,v,c,t;
> >>> analyze table mv_agg_gby_col_partitioned compute statistics for columns;
> >>> set hive.explain.user=false;
> >>> explain select b,f,sum(b) from all100k where t=93 group by c,v,f,b;
> !!! match row_contains
>           alias: iceberg_test_db_hive.mv_agg_gby_col_partitioned
> >>> drop materialized view mv_agg_gby_col_partitioned;
>  {code}
> Error
> {code:java}
> 2023-01-10T20:31:17,514 INFO  [pool-5-thread-1] jdbc.TestDriver: Query: 
> create materialized view mv_agg_gby_col_partitioned PARTITIONED ON (t) stored 
> by iceberg stored as orc tblproperties ('format-version'='1') as select 
> b,f,sum(b), sum(f),t from all100k group by b,f,v,c,t
> 2023-01-10T20:31:18,099 INFO  [Thread-21] jdbc.TestDriver: INFO  : Compiling 
> command(queryId=hive_20230110203117_6c333b6a-1642-40e7-80bc-e78dede47980): 
> create materialized view mv_agg_gby_col_partitioned PARTITIONED ON (t) stored 
> by iceberg stored as orc tblproperties ('format-version'='1') as select 
> b,f,sum(b), sum(f),t from all100k group by b,f,v,c,t
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver: INFO  : No Stats 
> for iceberg_test_db_hive@all100k, Columns: b, c, t, f, v
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver: ERROR : FAILED: 
> SemanticException Line 0:-1 Cannot insert into target table because column 
> number/types are different 'TOK_TMP_FILE': Table insclause-0 has 6 columns, 
> but query has 5 columns.
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver: 
> org.apache.hadoop.hive.ql.parse.SemanticException: Line 0:-1 Cannot insert 
> into target table because column number/types are different 'TOK_TMP_FILE': 
> Table insclause-0 has 6 columns, but query has 5 columns.
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genConversionSelectOperator(SemanticAnalyzer.java:8905)
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genFileSinkPlan(SemanticAnalyzer.java:8114)
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPostGroupByBodyPlan(SemanticAnalyzer.java:11583)
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:11455)
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:12424)
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:12290)
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genOPTree(SemanticAnalyzer.java:13038)
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:756)
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:13154)
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:472)
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:313)
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.Compiler.analyze(Compiler.java:222)
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:105)
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.Driver.compile(Driver.java:201)
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:657)
> 2023-01-10T20:31:18,100 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:603)
> 2023-01-10T20:31:18,101 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:597)
> 2023-01-10T20:31:18,101 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:127)
> 2023-01-10T20:31:18,101 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:206)
> 2023-01-10T20:31:18,101 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork$1.run(SQLOperation.java:336)
> 2023-01-10T20:31:18,101 INFO  [Thread-21] jdbc.TestDriver:     at 
> java.base/java.security.AccessController.doPrivileged(Native Method)
> 2023-01-10T20:31:18,101 INFO  [Thread-21] jdbc.TestDriver:     at 
> java.base/javax.security.auth.Subject.doAs(Subject.java:423)
> 2023-01-10T20:31:18,101 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1899)
> 2023-01-10T20:31:18,101 INFO  [Thread-21] jdbc.TestDriver:     at 
> org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork.run(SQLOperation.java:358)
> 2023-01-10T20:31:18,101 INFO  [Thread-21] jdbc.TestDriver:     at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> 2023-01-10T20:31:18,101 INFO  [Thread-21] jdbc.TestDriver:     at 
> java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> 2023-01-10T20:31:18,101 INFO  [Thread-21] jdbc.TestDriver:     at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> 2023-01-10T20:31:18,101 INFO  [Thread-21] jdbc.TestDriver:     at 
> java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> 2023-01-10T20:31:18,101 INFO  [Thread-21] jdbc.TestDriver:     at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> 2023-01-10T20:31:18,101 INFO  [Thread-21] jdbc.TestDriver:     at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> 2023-01-10T20:31:18,101 INFO  [Thread-21] jdbc.TestDriver:     at 
> java.base/java.lang.Thread.run(Thread.java:829)
> 2023-01-10T20:31:18,101 INFO  [Thread-21] jdbc.TestDriver:
> 2023-01-10T20:31:18,101 INFO  [Thread-21] jdbc.TestDriver: INFO  : Completed 
> compiling 
> command(queryId=hive_20230110203117_6c333b6a-1642-40e7-80bc-e78dede47980); 
> Time taken: 0.526 seconds
> 2023-01-10T20:31:18,306 ERROR [pool-5-thread-1] jdbc.TestDriver: Error while 
> compiling statement: FAILED: SemanticException Line 0:-1 Cannot insert into 
> target table because column number/types are different 'TOK_TMP_FILE': Table 
> insclause-0 has 6 columns, but query has 5 columns. {code}
> Similar query works for Hive native materialized views.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to