You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2021/07/10 02:10:21 UTC
[incubator-doris] branch master updated: [Planner] Align Date and
Datetime by 16 bytes (#6105)
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 e426fbd [Planner] Align Date and Datetime by 16 bytes (#6105)
e426fbd is described below
commit e426fbd6bed9c4245bc85807c5bd39c2b948f720
Author: EmmyMiao87 <52...@qq.com>
AuthorDate: Sat Jul 10 10:10:04 2021 +0800
[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.
---
.../src/main/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 1cfdf47..0b4553c 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);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org