From e426fbd6bed9c4245bc85807c5bd39c2b948f720 Mon Sep 17 00:00:00 2001 From: EmmyMiao87 <522274284@qq.com> Date: Sat, 10 Jul 2021 10:10:04 +0800 Subject: [PATCH] [Planner] Align Date and Datetime by 16 bytes (#6105) The previous alignment of Doris is up to 8 bytes. For types with more than 8 bytes, such as Date, Datetime is not aligned. This PR is mainly to relax the maximum 8-byte limitation Also, because the data type Decimal v1 no longer exists, the logic of the 40-byte Decimal v1 is also discarded. --- .../java/org/apache/doris/analysis/TupleDescriptor.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/TupleDescriptor.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/TupleDescriptor.java index 1cfdf47ec5..0b4553c445 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/TupleDescriptor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/TupleDescriptor.java @@ -203,10 +203,7 @@ public class TupleDescriptor { } if (slotSize > 1) { // insert padding - int alignTo = Math.min(slotSize, 8); - if (slotSize == 40) { - alignTo = 4; - } + int alignTo = slotSize; offset = (offset + alignTo - 1) / alignTo * alignTo; } @@ -233,7 +230,6 @@ public class TupleDescriptor { } this.byteSize = offset; - // LOG.debug("tuple is {}", byteSize); } /**