[ https://issues.apache.org/jira/browse/HIVE-23089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17073986#comment-17073986 ]
Hive QA commented on HIVE-23089: -------------------------------- Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12998472/HIVE-23089.1.patch {color:red}ERROR:{color} -1 due to no test(s) being added or modified. {color:red}ERROR:{color} -1 due to 2 failed/errored test(s), 18163 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[enforce_constraint_notnull] (batchId=171) org.apache.hive.jdbc.TestNewGetSplitsFormatReturnPath.testInvalidReferenceCountScenario (batchId=295) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/21390/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/21390/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-21390/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.YetusPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 2 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12998472 - PreCommit-HIVE-Build > Add constraint checks to CBO plan > --------------------------------- > > Key: HIVE-23089 > URL: https://issues.apache.org/jira/browse/HIVE-23089 > Project: Hive > Issue Type: Improvement > Components: CBO > Reporter: Krisztian Kasa > Assignee: Krisztian Kasa > Priority: Major > Attachments: HIVE-23089.1.patch > > > {code} > create table acid_uami(i int, > de decimal(5,2) constraint nn1 not null enforced, > vc varchar(128) constraint nn2 not null enforced) clustered > by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true'); > explain > update acid_uami set de=null where i=1; > {code} > Non-CBO path: > {code:java} > Map Operator Tree: > TableScan > alias: acid_uami > filterExpr: ((i = 1) and enforce_constraint(vc is not null)) > (type: boolean) > Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE > Column stats: NONE > Filter Operator > predicate: ((i = 1) and enforce_constraint(vc is not null)) > (type: boolean) > {code} > CBO path: > {code:java} > Map Reduce > Map Operator Tree: > TableScan > alias: acid_uami > filterExpr: (i = 1) (type: boolean) > Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE > Column stats: NONE > Filter Operator > predicate: (i = 1) (type: boolean) > ... > Reduce Operator Tree: > ... > Filter Operator > predicate: enforce_constraint((null is not null and _col3 is not > null)) (type: boolean) > {code} > In CBO path the enforce_constraint function is added to the plan when CBO > plan is already generated and optimized. > {code} > HiveSortExchange(distribution=[any], collation=[[0]]) > HiveProject(row__id=[$5], i=[CAST(1):INTEGER], _o__c2=[null:NULL], vc=[$2]) > HiveFilter(condition=[=($0, 1)]) > HiveTableScan(table=[[default, acid_uami]], table:alias=[acid_uami]) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)