Skip to content

Commit

Permalink
Support range frame type (#7629)
Browse files Browse the repository at this point in the history
ref #7376
  • Loading branch information
xzhangxian1008 authored Aug 22, 2023
1 parent 27882f7 commit e7f5cb5
Show file tree
Hide file tree
Showing 15 changed files with 2,628 additions and 113 deletions.
10 changes: 5 additions & 5 deletions dbms/src/Core/Field.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,15 +377,15 @@ class Field
T & get()
{
using TWithoutRef = std::remove_reference_t<T>;
TWithoutRef * MAY_ALIAS ptr = reinterpret_cast<TWithoutRef *>(&storage);
auto * MAY_ALIAS ptr = reinterpret_cast<TWithoutRef *>(&storage);
return *ptr;
};

template <typename T>
const T & get() const
{
using TWithoutRef = std::remove_reference_t<T>;
const TWithoutRef * MAY_ALIAS ptr = reinterpret_cast<const TWithoutRef *>(&storage);
const auto * MAY_ALIAS ptr = reinterpret_cast<const TWithoutRef *>(&storage);
return *ptr;
};

Expand Down Expand Up @@ -582,7 +582,7 @@ class Field
void createConcrete(T && x)
{
using JustT = std::decay_t<T>;
JustT * MAY_ALIAS ptr = reinterpret_cast<JustT *>(&storage);
auto * MAY_ALIAS ptr = reinterpret_cast<JustT *>(&storage);
new (ptr) JustT(std::forward<T>(x));
which = TypeToEnum<JustT>::value;
}
Expand All @@ -592,7 +592,7 @@ class Field
void assignConcrete(T && x)
{
using JustT = std::decay_t<T>;
JustT * MAY_ALIAS ptr = reinterpret_cast<JustT *>(&storage);
auto * MAY_ALIAS ptr = reinterpret_cast<JustT *>(&storage);
*ptr = std::forward<T>(x);
}

Expand Down Expand Up @@ -669,7 +669,7 @@ class Field

void create(const char * data, size_t size)
{
String * MAY_ALIAS ptr = reinterpret_cast<String *>(&storage);
auto * MAY_ALIAS ptr = reinterpret_cast<String *>(&storage);
new (ptr) String(data, size);
which = Types::String;
}
Expand Down
Loading

0 comments on commit e7f5cb5

Please sign in to comment.