-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix createTimestampVector without nulls buffer #8955
Conversation
✅ Deploy Preview for meta-velox canceled.
|
|
||
auto output = importFromArrow(arrowSchema1, arrowArray1, pool_.get()); | ||
assertVectorContent(inputValues, output, arrowArray1.null_count); | ||
if constexpr (std::is_same_v<TOutput, Timestamp>) { | ||
std::vector<std::optional<Timestamp>> expectedValues; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM.
nit: it would be better to extract the detail of this brach to a separate function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. Thanks.
0027168
to
9e8fda9
Compare
Hi @mbasmanova @Yuhta, would you like to review this PR? Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Yuhta Jimmy, would you help review this PR?
@@ -1135,38 +1135,45 @@ class ArrowBridgeArrayImportTest : public ArrowBridgeArrayExportTest { | |||
"ttn", {Timestamp(0, 0), std::nullopt, Timestamp(1699308257, 1234)}); | |||
} | |||
|
|||
void testImportWithoutNullsBuffer() { | |||
std::vector<std::optional<int64_t>> inputValues = {1, 2, 3, 4, 5}; | |||
template <typename TInput, typename TOutput> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: TInput
can be inferred from inputValues
so we can move it to end of the type parameter list and omit it at call sites.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your suggestion. Updated.
9528e9b
to
6ecdbb6
Compare
@Yuhta has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: This PR fixes the failure of `createTimestampVector` when nulls buffer is nullptr. facebookincubator#7625 (comment) Pull Request resolved: facebookincubator#8955 Reviewed By: xiaoxmeng Differential Revision: D54590232 Pulled By: Yuhta fbshipit-source-id: a41846bbad9f51f4569623b013044c3c1feac24f
This PR fixes the failure of
createTimestampVector
when nulls buffer isnullptr.
#7625 (comment)