Replies: 1 comment 2 replies
-
You'll have to be more specific, where is this type check taking place? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I read code, I found append function will check type like below:
The type check will check what
col.GetType().id()
is, ifcol.GetType().id()
isLogicalTypeId::BOOLEAN
, then it callAppendValueInternal<T, bool>(col, input);
. And such type check will happen every time we call append function, it should be time consuming.However, can we add a template class TypedAppender<Types...>, for example, suppose we have
TypeAppender<bool, uint8_t>
, then we can provide an appenderRow function in this way:so we don't have to do type check every time we call append function, performance should be better. (btw, only c++ programmer can benefit from it.)
The only risk is we may write wrong types for a table. But it's not a really problem, we can add some check in the constructor of TypeAppender.
Beta Was this translation helpful? Give feedback.
All reactions