Skip to content

Commit

Permalink
[BugFix] Fix grascale upgrade between main and lower version (StarRoc…
Browse files Browse the repository at this point in the history
…ks#30436)

Introduced by StarRocks#26246.

TOlapScanNode.columns_desc should be optional instead of required.

BTW, some codes in BE use thrift_olap_scan_node.columns_desc directly. This is safe, because the default value of thrift_olap_scan_node.columns_desc is an empty std::vector<>.

---------

Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
  • Loading branch information
ZiheLiu authored Sep 6, 2023
1 parent 368859f commit 12d0bf1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,8 @@ protected void toThrift(TPlanNode msg) {
} else { // If you find yourself changing this code block, see also the above code block
msg.node_type = TPlanNodeType.OLAP_SCAN_NODE;
msg.olap_scan_node =
new TOlapScanNode(desc.getId().asInt(), keyColumnNames,
keyColumnTypes, isPreAggregation, columnsDesc);
new TOlapScanNode(desc.getId().asInt(), keyColumnNames, keyColumnTypes, isPreAggregation);
msg.olap_scan_node.setColumns_desc(columnsDesc);
msg.olap_scan_node.setSort_key_column_names(keyColumnNames);
msg.olap_scan_node.setRollup_name(olapTable.getIndexNameById(selectedIndexId));
if (!conjuncts.isEmpty()) {
Expand Down
2 changes: 1 addition & 1 deletion gensrc/thrift/PlanNodes.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ struct TOlapScanNode {
29: optional list<TColumnAccessPath> column_access_paths

30: optional bool use_pk_index
31: required list<Descriptors.TColumn> columns_desc
31: optional list<Descriptors.TColumn> columns_desc
32: optional bool output_chunk_by_bucket
}

Expand Down

0 comments on commit 12d0bf1

Please sign in to comment.