This is an automated email from the ASF dual-hosted git repository. snlee pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/master by this push: new bdeec8d Fixing the issue with result schema (#6353) bdeec8d is described below commit bdeec8d84085b965b3808006a795e263a0152fbb Author: Seunghyun Lee <sn...@linkedin.com> AuthorDate: Mon Dec 14 23:46:08 2020 -0800 Fixing the issue with result schema (#6353) The existing code returns the wrong result schema when order by column does not appear as part of the selection columns. This fixes the minor bug in the code and returns the schema correctly. --- .../org/apache/pinot/core/query/selection/SelectionOperatorUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pinot-core/src/main/java/org/apache/pinot/core/query/selection/SelectionOperatorUtils.java b/pinot-core/src/main/java/org/apache/pinot/core/query/selection/SelectionOperatorUtils.java index 99d8f8b..f589806 100644 --- a/pinot-core/src/main/java/org/apache/pinot/core/query/selection/SelectionOperatorUtils.java +++ b/pinot-core/src/main/java/org/apache/pinot/core/query/selection/SelectionOperatorUtils.java @@ -179,7 +179,7 @@ public class SelectionOperatorUtils { int numColumns = selectionColumns.size(); Map<String, DataSchema.ColumnDataType> columnNameToDataType = new HashMap<>(); DataSchema.ColumnDataType[] finalColumnDataTypes = new DataSchema.ColumnDataType[numColumns]; - for (int i = 0; i < numColumns; i++) { + for (int i = 0; i < dataSchema.size(); i++) { columnNameToDataType.put(dataSchema.getColumnName(i), dataSchema.getColumnDataType(i)); } for (int i = 0; i < numColumns; i++) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org