scarlin-cloudera commented on a change in pull request #809: HIVE-22274: 
upgrade Calcite to 1.21
URL: https://github.com/apache/hive/pull/809#discussion_r335046695
 
 

 ##########
 File path: ql/src/test/results/clientpositive/concat_op.q.out
 ##########
 @@ -311,7 +311,7 @@ POSTHOOK: query: explain formatted select key || value 
from src
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
-{"CBOPlan":"{\n  \"rels\": [\n    {\n      \"id\": \"0\",\n      \"relOp\": 
\"org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan\",\n   
   \"table\": [\n        \"default\",\n        \"src\"\n      ],\n      
\"table:alias\": \"src\",\n      \"inputs\": [],\n      \"rowCount\": 500.0,\n  
    \"avgRowSize\": 9.624,\n      \"rowType\": [\n        {\n          
\"type\": \"VARCHAR\",\n          \"nullable\": true,\n          \"precision\": 
2147483647,\n          \"name\": \"key\"\n        },\n        {\n          
\"type\": \"VARCHAR\",\n          \"nullable\": true,\n          \"precision\": 
2147483647,\n          \"name\": \"value\"\n        },\n        {\n          
\"type\": \"BIGINT\",\n          \"nullable\": true,\n          \"name\": 
\"BLOCK__OFFSET__INSIDE__FILE\"\n        },\n        {\n          \"type\": 
\"VARCHAR\",\n          \"nullable\": true,\n          \"precision\": 
2147483647,\n          \"name\": \"INPUT__FILE__NAME\"\n        },\n        {\n 
         \"fields\": [\n            {\n              \"type\": \"BIGINT\",\n    
          \"nullable\": true,\n              \"name\": \"writeid\"\n            
},\n            {\n              \"type\": \"INTEGER\",\n              
\"nullable\": true,\n              \"name\": \"bucketid\"\n            },\n     
       {\n              \"type\": \"BIGINT\",\n              \"nullable\": 
true,\n              \"name\": \"rowid\"\n            }\n          ],\n         
 \"name\": \"ROW__ID\"\n        }\n      ],\n      \"colStats\": [\n        {\n 
         \"name\": \"key\",\n          \"ndv\": 316\n        },\n        {\n    
      \"name\": \"value\",\n          \"ndv\": 307\n        }\n      ]\n    
},\n    {\n      \"id\": \"1\",\n      \"relOp\": 
\"org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveProject\",\n     
 \"fields\": [\n        \"_o__c0\"\n      ],\n      \"exprs\": [\n        {\n   
       \"op\": \"||\",\n          \"operands\": [\n            {\n              
\"input\": 0,\n              \"name\": \"$0\"\n            },\n            {\n  
            \"input\": 1,\n              \"name\": \"$1\"\n            }\n      
    ]\n        }\n      ],\n      \"rowCount\": 500.0\n    }\n  
]\n}","optimizedSQL":"SELECT `key` || `value` AS `_o__c0`\nFROM 
`default`.`src`","cboInfo":"Plan optimized by CBO.","STAGE 
DEPENDENCIES":{"Stage-1":{"ROOT STAGE":"TRUE"},"Stage-0":{"DEPENDENT 
STAGES":"Stage-1"}},"STAGE PLANS":{"Stage-1":{"Map Reduce":{"Map Operator 
Tree:":[{"TableScan":{"alias:":"src","columns:":["key","value"],"database:":"default","Statistics:":"Num
 rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: 
COMPLETE","table:":"src","isTempTable:":"false","OperatorId:":"TS_0","children":{"Select
 Operator":{"expressions:":"concat(key, value) (type: 
string)","columnExprMap:":{"_col0":"concat(key, 
value)"},"outputColumnNames:":["_col0"],"Statistics:":"Num rows: 500 Data size: 
92000 Basic stats: COMPLETE Column stats: 
COMPLETE","OperatorId:":"SEL_3","children":{"File Output 
Operator":{"compressed:":"false","Statistics:":"Num rows: 500 Data size: 92000 
Basic stats: COMPLETE Column stats: COMPLETE","table:":{"input 
format:":"org.apache.hadoop.mapred.SequenceFileInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"},"OperatorId:":"FS_4"}}}}}}],"Execution
 mode:":"vectorized"}},"Stage-0":{"Fetch Operator":{"limit:":"-1","Processor 
Tree:":{"ListSink":{"OperatorId:":"LIST_SINK_5"}}}}}}
+{"CBOPlan":"{\n  \"rels\": [\n    {\n      \"id\": \"0\",\n      \"relOp\": 
\"org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan\",\n   
   \"table\": [\n        \"default\",\n        \"src\"\n      ],\n      
\"table:alias\": \"src\",\n      \"inputs\": [],\n      \"rowCount\": 500.0,\n  
    \"avgRowSize\": 9.624,\n      \"rowType\": [\n        {\n          
\"type\": \"VARCHAR\",\n          \"nullable\": true,\n          \"precision\": 
2147483647,\n          \"name\": \"key\"\n        },\n        {\n          
\"type\": \"VARCHAR\",\n          \"nullable\": true,\n          \"precision\": 
2147483647,\n          \"name\": \"value\"\n        },\n        {\n          
\"type\": \"BIGINT\",\n          \"nullable\": true,\n          \"name\": 
\"BLOCK__OFFSET__INSIDE__FILE\"\n        },\n        {\n          \"type\": 
\"VARCHAR\",\n          \"nullable\": true,\n          \"precision\": 
2147483647,\n          \"name\": \"INPUT__FILE__NAME\"\n        },\n        {\n 
         \"fields\": [\n            {\n              \"type\": \"BIGINT\",\n    
          \"nullable\": true,\n              \"name\": \"writeid\"\n            
},\n            {\n              \"type\": \"INTEGER\",\n              
\"nullable\": true,\n              \"name\": \"bucketid\"\n            },\n     
       {\n              \"type\": \"BIGINT\",\n              \"nullable\": 
true,\n              \"name\": \"rowid\"\n            }\n          ],\n         
 \"name\": \"ROW__ID\"\n        }\n      ],\n      \"colStats\": [\n        {\n 
         \"name\": \"key\",\n          \"ndv\": 316\n        },\n        {\n    
      \"name\": \"value\",\n          \"ndv\": 307\n        }\n      ]\n    
},\n    {\n      \"id\": \"1\",\n      \"relOp\": 
\"org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveProject\",\n     
 \"fields\": [\n        \"_o__c0\"\n      ],\n      \"exprs\": [\n        {\n   
       \"op\": {\n            \"name\": \"||\",\n            \"kind\": 
\"OTHER_FUNCTION\",\n            \"syntax\": \"SPECIAL\"\n          },\n        
  \"operands\": [\n            {\n              \"input\": 0,\n              
\"name\": \"$0\"\n            },\n            {\n              \"input\": 1,\n  
            \"name\": \"$1\"\n            }\n          ]\n        }\n      ],\n 
     \"rowCount\": 500.0\n    }\n  ]\n}","optimizedSQL":"SELECT `key` || 
`value` AS `_o__c0`\nFROM `default`.`src`","cboInfo":"Plan optimized by 
CBO.","STAGE DEPENDENCIES":{"Stage-1":{"ROOT 
STAGE":"TRUE"},"Stage-0":{"DEPENDENT STAGES":"Stage-1"}},"STAGE 
PLANS":{"Stage-1":{"Map Reduce":{"Map Operator 
Tree:":[{"TableScan":{"alias:":"src","columns:":["key","value"],"database:":"default","Statistics:":"Num
 rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: 
COMPLETE","table:":"src","isTempTable:":"false","OperatorId:":"TS_0","children":{"Select
 Operator":{"expressions:":"concat(key, value) (type: 
string)","columnExprMap:":{"_col0":"concat(key, 
value)"},"outputColumnNames:":["_col0"],"Statistics:":"Num rows: 500 Data size: 
92000 Basic stats: COMPLETE Column stats: 
COMPLETE","OperatorId:":"SEL_3","children":{"File Output 
Operator":{"compressed:":"false","Statistics:":"Num rows: 500 Data size: 92000 
Basic stats: COMPLETE Column stats: COMPLETE","table:":{"input 
format:":"org.apache.hadoop.mapred.SequenceFileInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"},"OperatorId:":"FS_4"}}}}}}],"Execution
 mode:":"vectorized"}},"Stage-0":{"Fetch Operator":{"limit:":"-1","Processor 
Tree:":{"ListSink":{"OperatorId:":"LIST_SINK_5"}}}}}}
 
 Review comment:
   I only looked at it briefly, but Calcite definitely made some changes in 
their json.
   
   Here, it looks like "op" contains a mapping (e.g. operands got pushed under 
op as opposed to being on the same level).  If you want, I'll hunt down the 
Calcite Jira.
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to