This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push: new 62b38d7a75 [fix](spark load) fix `getHashValue` of string type is always zero in spark load. (#9136) 62b38d7a75 is described below commit 62b38d7a75e78f9d03265484fdec653013c7b295 Author: spaces-x <weixiao5...@gmail.com> AuthorDate: Tue Apr 26 10:14:21 2022 +0800 [fix](spark load) fix `getHashValue` of string type is always zero in spark load. (#9136) Buffer flip is used incorrectly. When the hash key is string type, the hash value is always zero. The reason is that the buffer of string type is obtained by wrap, which is not needed to flip. If we do so, the buffer limit for read will be zero. --- .../src/main/java/org/apache/doris/load/loadv2/dpp/DppUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fe/spark-dpp/src/main/java/org/apache/doris/load/loadv2/dpp/DppUtils.java b/fe/spark-dpp/src/main/java/org/apache/doris/load/loadv2/dpp/DppUtils.java index a019338bc3..1249cac993 100644 --- a/fe/spark-dpp/src/main/java/org/apache/doris/load/loadv2/dpp/DppUtils.java +++ b/fe/spark-dpp/src/main/java/org/apache/doris/load/loadv2/dpp/DppUtils.java @@ -182,7 +182,10 @@ public class DppUtils { byte value = (byte) (b ? 1 : 0); buffer.put(value); } - buffer.flip(); + // do not flip buffer when the buffer was created by wrap() + if (!type.equals(DataTypes.StringType)) { + buffer.flip(); + } return buffer; } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org