Skip to content
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

3 more fixes to UnsafeRow serialization #4797

Closed
wants to merge 1 commit into from

Conversation

pedroerp
Copy link
Contributor

@pedroerp pedroerp commented May 1, 2023

Summary:
3 more fixes to UnsafeRow serialization to make it compatible with
Spark Java:

  • The first integer that describes the row size needs to be 32 not 64 bits.
  • This integer needs to be serialized in big endian order. Curiously, the
    remaining integers within the UnsafeRow itself are little endian.
  • The input buffer allocated needs to be initialized to zero, since not all
    portions of it will be initialized in the UnsafeRow serialization code.

Differential Revision: D45446862

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 1, 2023
@netlify
Copy link

netlify bot commented May 1, 2023

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit c0dd913
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/64505250827e1b0009ac158b

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45446862

pedroerp added a commit to pedroerp/velox-1 that referenced this pull request May 1, 2023
Summary:
Pull Request resolved: facebookincubator#4797

3 more fixes to UnsafeRow serialization to make it compatible with
Spark Java:
- The first integer that describes the row size needs to be 32 not 64 bits.
- This integer needs to be serialized in big endian order. Curiously, the
  remaining integers within the UnsafeRow itself are little endian.
- The input buffer allocated needs to be initialized to zero, since not all
  portions of it will be initialized in the UnsafeRow serialization code.

Differential Revision: D45446862

fbshipit-source-id: ab217bfa38380dedd9c1e90dd9519371d93a0e3b
@pedroerp pedroerp force-pushed the export-D45446862 branch from bcdf51b to da3a068 Compare May 1, 2023 17:16
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45446862

Copy link
Contributor

@mbasmanova mbasmanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pedroerp Pedro, thank you for the fixes. Would you also update documentation to explain these details?

Copy link
Contributor

@miaoever miaoever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @pedroerp . Looks good to me.

testDeserialize(data, 20, expected);
}

TEST_F(UnsafeRowSerializerTest, string) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these tests go into velox/row/tests/UnsafeRowSerdeTest.cpp ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These test the full "package" or "stream" (the size, plus potentially many unsafe rows). The ones under velox/row only test the content of a single unsafe row.

pedroerp added a commit to pedroerp/velox-1 that referenced this pull request May 1, 2023
Summary:
Pull Request resolved: facebookincubator#4797

3 more fixes to UnsafeRow serialization to make it compatible with
Spark Java:
- The first integer that describes the row size needs to be 32 not 64 bits.
- This integer needs to be serialized in big endian order. Curiously, the
  remaining integers within the UnsafeRow itself are little endian.
- The input buffer allocated needs to be initialized to zero, since not all
  portions of it will be initialized in the UnsafeRow serialization code.

Differential Revision: D45446862

fbshipit-source-id: 5ed254ce7663cd811a796ac3808333cc554ce903
@pedroerp pedroerp force-pushed the export-D45446862 branch from da3a068 to eb43474 Compare May 1, 2023 21:32
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45446862

pedroerp added a commit to pedroerp/velox-1 that referenced this pull request May 1, 2023
Summary:
Pull Request resolved: facebookincubator#4797

3 more fixes to UnsafeRow serialization to make it compatible with
Spark Java:
- The first integer that describes the row size needs to be 32 not 64 bits.
- This integer needs to be serialized in big endian order. Curiously, the
  remaining integers within the UnsafeRow itself are little endian.
- The input buffer allocated needs to be initialized to zero, since not all
  portions of it will be initialized in the UnsafeRow serialization code.

Reviewed By: mbasmanova

Differential Revision: D45446862

fbshipit-source-id: 4480ff99f7b784459d2f7f778d8f8d9371cda0a1
@pedroerp pedroerp force-pushed the export-D45446862 branch from eb43474 to 6d02c9a Compare May 1, 2023 21:38
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45446862

Summary:
Pull Request resolved: facebookincubator#4797

3 more fixes to UnsafeRow serialization to make it compatible with
Spark Java:
- The first integer that describes the row size needs to be 32 not 64 bits.
- This integer needs to be serialized in big endian order. Curiously, the
  remaining integers within the UnsafeRow itself are little endian.
- The input buffer allocated needs to be initialized to zero, since not all
  portions of it will be initialized in the UnsafeRow serialization code.

Reviewed By: mbasmanova

Differential Revision: D45446862

fbshipit-source-id: 0e43d4e8f7254234870bf09567fd2ecd7e158e88
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45446862

@pedroerp pedroerp force-pushed the export-D45446862 branch from 6d02c9a to c0dd913 Compare May 1, 2023 23:59
pedroerp added a commit to pedroerp/presto that referenced this pull request May 2, 2023
Summary:
X-link: facebookincubator/velox#4797

3 more fixes to UnsafeRow serialization to make it compatible with
Spark Java:
- The first integer that describes the row size needs to be 32 not 64 bits.
- This integer needs to be serialized in big endian order. Curiously, the
  remaining integers within the UnsafeRow itself are little endian.
- The input buffer allocated needs to be initialized to zero, since not all
  portions of it will be initialized in the UnsafeRow serialization code.

Reviewed By: mbasmanova

Differential Revision: D45446862

fbshipit-source-id: 0961b9a27f367803bb1da149729128c0a6dbc15f
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 7d5cf2f.

xiaoxmeng pushed a commit to prestodb/presto that referenced this pull request May 3, 2023
Summary:
X-link: facebookincubator/velox#4797

3 more fixes to UnsafeRow serialization to make it compatible with
Spark Java:
- The first integer that describes the row size needs to be 32 not 64 bits.
- This integer needs to be serialized in big endian order. Curiously, the
  remaining integers within the UnsafeRow itself are little endian.
- The input buffer allocated needs to be initialized to zero, since not all
  portions of it will be initialized in the UnsafeRow serialization code.

Reviewed By: mbasmanova

Differential Revision: D45446862

fbshipit-source-id: 0961b9a27f367803bb1da149729128c0a6dbc15f
wanglinsong pushed a commit to prestodb/presto that referenced this pull request May 10, 2023
Summary:
X-link: facebookincubator/velox#4797

3 more fixes to UnsafeRow serialization to make it compatible with
Spark Java:
- The first integer that describes the row size needs to be 32 not 64 bits.
- This integer needs to be serialized in big endian order. Curiously, the
  remaining integers within the UnsafeRow itself are little endian.
- The input buffer allocated needs to be initialized to zero, since not all
  portions of it will be initialized in the UnsafeRow serialization code.

Reviewed By: mbasmanova

Differential Revision: D45446862

fbshipit-source-id: 0961b9a27f367803bb1da149729128c0a6dbc15f
wanglinsong pushed a commit to prestodb/presto that referenced this pull request May 17, 2023
Summary:
X-link: facebookincubator/velox#4797

3 more fixes to UnsafeRow serialization to make it compatible with
Spark Java:
- The first integer that describes the row size needs to be 32 not 64 bits.
- This integer needs to be serialized in big endian order. Curiously, the
  remaining integers within the UnsafeRow itself are little endian.
- The input buffer allocated needs to be initialized to zero, since not all
  portions of it will be initialized in the UnsafeRow serialization code.

Reviewed By: mbasmanova

Differential Revision: D45446862

fbshipit-source-id: 0961b9a27f367803bb1da149729128c0a6dbc15f
Mionsz pushed a commit to Mionsz/presto that referenced this pull request Jun 2, 2023
Summary:
X-link: facebookincubator/velox#4797

3 more fixes to UnsafeRow serialization to make it compatible with
Spark Java:
- The first integer that describes the row size needs to be 32 not 64 bits.
- This integer needs to be serialized in big endian order. Curiously, the
  remaining integers within the UnsafeRow itself are little endian.
- The input buffer allocated needs to be initialized to zero, since not all
  portions of it will be initialized in the UnsafeRow serialization code.

Reviewed By: mbasmanova

Differential Revision: D45446862

fbshipit-source-id: 0961b9a27f367803bb1da149729128c0a6dbc15f
@pedroerp pedroerp added the remote-function Related to remote function support in Velox. label Jun 30, 2023
yiweiHeOSS pushed a commit to yiweiHeOSS/velox that referenced this pull request Jul 15, 2023
Summary:
X-link: prestodb/presto#19502

Pull Request resolved: facebookincubator#4797

3 more fixes to UnsafeRow serialization to make it compatible with
Spark Java:
- The first integer that describes the row size needs to be 32 not 64 bits.
- This integer needs to be serialized in big endian order. Curiously, the
  remaining integers within the UnsafeRow itself are little endian.
- The input buffer allocated needs to be initialized to zero, since not all
  portions of it will be initialized in the UnsafeRow serialization code.

diff-train-skip-merge

Reviewed By: mbasmanova

Differential Revision: D45446862

fbshipit-source-id: 74366c7e76ab1467c5e68d321430ad9da5b3830a
wypb pushed a commit to wypb/presto that referenced this pull request Dec 22, 2023
Summary:
X-link: facebookincubator/velox#4797

3 more fixes to UnsafeRow serialization to make it compatible with
Spark Java:
- The first integer that describes the row size needs to be 32 not 64 bits.
- This integer needs to be serialized in big endian order. Curiously, the
  remaining integers within the UnsafeRow itself are little endian.
- The input buffer allocated needs to be initialized to zero, since not all
  portions of it will be initialized in the UnsafeRow serialization code.

Reviewed By: mbasmanova

Differential Revision: D45446862

fbshipit-source-id: 0961b9a27f367803bb1da149729128c0a6dbc15f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged remote-function Related to remote function support in Velox.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants