Skip to content

Commit

Permalink
remove time zone from data_time (apache#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
yangzhg authored and HappenLee committed Aug 10, 2021
1 parent 1945b2d commit d6a0c3e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion be/src/vec/data_types/data_type_date_time.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace doris::vectorized {
*/
class DataTypeDateTime final : public DataTypeNumberBase<Int128> {
public:
DataTypeDateTime(const std::string& time_zone_name = "");
DataTypeDateTime();

const char* getFamilyName() const override { return "DateTime"; }
std::string doGetName() const override;
Expand Down
10 changes: 6 additions & 4 deletions be/test/vec/core/block_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@

namespace doris {

using vectorized::Int32;

TEST(BlockTest, RowBatchCovertToBlock) {
SchemaScanner::ColumnDesc column_descs[] = {
{"k1", TYPE_SMALLINT, sizeof(int16_t), true},
Expand Down Expand Up @@ -214,12 +216,12 @@ TEST(BlockTest, SerializeAndDeserializeBlock) {
// Test Block
{
auto column_vector_int32 = vectorized::ColumnVector<Int32>::create();
auto column_nullable_vector = makeNullable(std::move(column_vector_int32));
auto column_nullable_vector = vectorized::makeNullable(std::move(column_vector_int32));
auto mutable_nullable_vector = std::move(*column_nullable_vector).mutate();
for (int i = 0; i < 4096; i++) {
mutable_nullable_vector->insert(vectorized::castToNearestFieldType(i));
}
auto data_type = makeNullable(std::make_shared<vectorized::DataTypeInt32>());
auto data_type = vectorized::makeNullable(std::make_shared<vectorized::DataTypeInt32>());
vectorized::ColumnWithTypeAndName type_and_name(mutable_nullable_vector->getPtr(),
data_type, "test_nullable_int32");
vectorized::Block block({type_and_name});
Expand Down Expand Up @@ -264,12 +266,12 @@ TEST(BlockTest, DumpData) {
"test_decimal");

auto column_vector_int32 = vectorized::ColumnVector<Int32>::create();
auto column_nullable_vector = makeNullable(std::move(column_vector_int32));
auto column_nullable_vector = vectorized::makeNullable(std::move(column_vector_int32));
auto mutable_nullable_vector = std::move(*column_nullable_vector).mutate();
for (int i = 0; i < 4096; i++) {
mutable_nullable_vector->insert(vectorized::castToNearestFieldType(i));
}
auto nint32_type = makeNullable(std::make_shared<vectorized::DataTypeInt32>());
auto nint32_type = vectorized::makeNullable(std::make_shared<vectorized::DataTypeInt32>());
vectorized::ColumnWithTypeAndName test_nullable_int32(mutable_nullable_vector->getPtr(),
nint32_type, "test_nullable_int32");

Expand Down

0 comments on commit d6a0c3e

Please sign in to comment.