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

ARROW-308: UnionListWriter.setPosition() should not call startList() #150

Closed
wants to merge 1 commit into from

Conversation

adeneche
Copy link
Contributor

No description provided.

@hnfgns
Copy link

hnfgns commented Sep 28, 2016

+1

@adeneche
Copy link
Contributor Author

merged

@adeneche adeneche closed this Sep 28, 2016
adeneche pushed a commit to adeneche/arrow that referenced this pull request Sep 28, 2016
wesm added a commit to wesm/arrow that referenced this pull request Sep 2, 2018
This function was implemented incorrectly in the original source code from Impala. The bug never presented itself because Impala allocates a much larger buffer than is required for the data page rather than using the `MaxBufferSize` value.

In a worst case scenario, the RleEncoder can result in a concatenation of short RLE runs of 8 values (the minimum for RLE). For example:

0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 ...

In encoded form, each RLE run occupies 2 bytes (for bit width 1). Thus 1024 values with this structure and bit width 1, at least 256 bytes are required to fully encode. If these were encoded as all literal runs, you can encode up to 504 values in a literal run (plus the indicator byte). Thus, in the same case (bit width 1) only

(504 + 504 + 16)
64 + 64 + 3 = 131

bytes are required. This should also fix PARQUET-698.

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes apache#150 from wesm/PARQUET-676 and squashes the following commits:

6ca44a8 [Wes McKinney] clang-format
e48b0bf [Wes McKinney] Fix maximum buffer sizing for hybrid RLE encoding case where short RLE runs use more space than mostly literal runs
wesm added a commit to wesm/arrow that referenced this pull request Sep 4, 2018
This function was implemented incorrectly in the original source code from Impala. The bug never presented itself because Impala allocates a much larger buffer than is required for the data page rather than using the `MaxBufferSize` value.

In a worst case scenario, the RleEncoder can result in a concatenation of short RLE runs of 8 values (the minimum for RLE). For example:

0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 ...

In encoded form, each RLE run occupies 2 bytes (for bit width 1). Thus 1024 values with this structure and bit width 1, at least 256 bytes are required to fully encode. If these were encoded as all literal runs, you can encode up to 504 values in a literal run (plus the indicator byte). Thus, in the same case (bit width 1) only

(504 + 504 + 16)
64 + 64 + 3 = 131

bytes are required. This should also fix PARQUET-698.

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes apache#150 from wesm/PARQUET-676 and squashes the following commits:

6ca44a8 [Wes McKinney] clang-format
e48b0bf [Wes McKinney] Fix maximum buffer sizing for hybrid RLE encoding case where short RLE runs use more space than mostly literal runs

Change-Id: Ia333b7b2ecd1d5dbc54842e584aad6afabaddb38
wesm added a commit to wesm/arrow that referenced this pull request Sep 6, 2018
This function was implemented incorrectly in the original source code from Impala. The bug never presented itself because Impala allocates a much larger buffer than is required for the data page rather than using the `MaxBufferSize` value.

In a worst case scenario, the RleEncoder can result in a concatenation of short RLE runs of 8 values (the minimum for RLE). For example:

0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 ...

In encoded form, each RLE run occupies 2 bytes (for bit width 1). Thus 1024 values with this structure and bit width 1, at least 256 bytes are required to fully encode. If these were encoded as all literal runs, you can encode up to 504 values in a literal run (plus the indicator byte). Thus, in the same case (bit width 1) only

(504 + 504 + 16)
64 + 64 + 3 = 131

bytes are required. This should also fix PARQUET-698.

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes apache#150 from wesm/PARQUET-676 and squashes the following commits:

6ca44a8 [Wes McKinney] clang-format
e48b0bf [Wes McKinney] Fix maximum buffer sizing for hybrid RLE encoding case where short RLE runs use more space than mostly literal runs

Change-Id: Ia333b7b2ecd1d5dbc54842e584aad6afabaddb38
wesm added a commit to wesm/arrow that referenced this pull request Sep 7, 2018
This function was implemented incorrectly in the original source code from Impala. The bug never presented itself because Impala allocates a much larger buffer than is required for the data page rather than using the `MaxBufferSize` value.

In a worst case scenario, the RleEncoder can result in a concatenation of short RLE runs of 8 values (the minimum for RLE). For example:

0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 ...

In encoded form, each RLE run occupies 2 bytes (for bit width 1). Thus 1024 values with this structure and bit width 1, at least 256 bytes are required to fully encode. If these were encoded as all literal runs, you can encode up to 504 values in a literal run (plus the indicator byte). Thus, in the same case (bit width 1) only

(504 + 504 + 16)
64 + 64 + 3 = 131

bytes are required. This should also fix PARQUET-698.

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes apache#150 from wesm/PARQUET-676 and squashes the following commits:

6ca44a8 [Wes McKinney] clang-format
e48b0bf [Wes McKinney] Fix maximum buffer sizing for hybrid RLE encoding case where short RLE runs use more space than mostly literal runs

Change-Id: Ia333b7b2ecd1d5dbc54842e584aad6afabaddb38
wesm added a commit to wesm/arrow that referenced this pull request Sep 8, 2018
This function was implemented incorrectly in the original source code from Impala. The bug never presented itself because Impala allocates a much larger buffer than is required for the data page rather than using the `MaxBufferSize` value.

In a worst case scenario, the RleEncoder can result in a concatenation of short RLE runs of 8 values (the minimum for RLE). For example:

0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 ...

In encoded form, each RLE run occupies 2 bytes (for bit width 1). Thus 1024 values with this structure and bit width 1, at least 256 bytes are required to fully encode. If these were encoded as all literal runs, you can encode up to 504 values in a literal run (plus the indicator byte). Thus, in the same case (bit width 1) only

(504 + 504 + 16)
64 + 64 + 3 = 131

bytes are required. This should also fix PARQUET-698.

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes apache#150 from wesm/PARQUET-676 and squashes the following commits:

6ca44a8 [Wes McKinney] clang-format
e48b0bf [Wes McKinney] Fix maximum buffer sizing for hybrid RLE encoding case where short RLE runs use more space than mostly literal runs

Change-Id: Ia333b7b2ecd1d5dbc54842e584aad6afabaddb38
rafael-telles added a commit to rafael-telles/arrow that referenced this pull request Oct 12, 2021
…a-serialization

[FlightSql] Fix Schema Serialization
zhouyuan pushed a commit to zhouyuan/arrow that referenced this pull request Aug 31, 2022
* Initial commit

* Remove WIP code

* Result null result in internal logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants