You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xi...@apache.org on 2019/08/16 05:19:44 UTC

[incubator-pinot] 01/01: update column data type cast during inter merge

This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch update_selection_query
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit 39c91cf7aa6f7bd3d305576474783779f8fc8363
Author: Xiang Fu <fx...@gmail.com>
AuthorDate: Thu Aug 15 22:19:08 2019 -0700

    update column data type cast during inter merge
---
 .../apache/pinot/core/query/selection/SelectionOperatorUtils.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 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 bbfa42f..42d3e64 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
@@ -39,6 +39,7 @@ import org.apache.pinot.common.request.Selection;
 import org.apache.pinot.common.request.SelectionSort;
 import org.apache.pinot.common.response.ServerInstance;
 import org.apache.pinot.common.response.broker.SelectionResults;
+import org.apache.pinot.common.utils.BytesUtils;
 import org.apache.pinot.common.utils.DataSchema;
 import org.apache.pinot.common.utils.DataTable;
 import org.apache.pinot.core.common.DataSourceMetadata;
@@ -249,7 +250,11 @@ public class SelectionOperatorUtils {
             break;
           case STRING:
           case BYTES: // BYTES are already converted to String for Selection, before reaching this layer.
-            dataTableBuilder.setColumn(i, ((String) columnValue));
+            if (columnValue instanceof byte[]) {
+              dataTableBuilder.setColumn(i, BytesUtils.toHexString((byte[]) columnValue));
+            } else {
+              dataTableBuilder.setColumn(i, ((String) columnValue));
+            }
             break;
 
           // Multi-value column.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org