-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-16757: [C++] Remove "scalar" output modality for ScalarKernel implementations, remove ValueDescr class #13521
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9695c78
Various porting toward removing ValueDescr from kernel APIs
wesm 85aa291
Fix Python bindings
wesm 3152b35
Fix R bindings compilation, but there are 3 failing tests to investigate
wesm 2b5b6a2
Fix compilation errors with gcc
wesm 1e68145
Fix R test failures
wesm 37008b8
Fix bugs inside otel macros
wesm f548fd7
Fix some bugs showing up with other compilers
wesm 89ab44e
Code review feedback
wesm 11e5f8f
[GLib] Follow API change
kou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1406,13 +1406,12 @@ class FixedSizeBinaryScalarPrinter(BaseBinaryScalarPrinter): | |||||
|
|
||||||
| def to_string(self): | ||||||
| size = self.type['byte_width_'] | ||||||
| if not self.is_valid: | ||||||
| return f"{self._format_type()} of size {size}, null value" | ||||||
| bufptr = BufferPtr(SharedPtr(self.val['value']).get()) | ||||||
| if bufptr.data is None: | ||||||
| return f"{self._format_type()} of size {size}, <unallocated>" | ||||||
| nullness = '' if self.is_valid else 'null with ' | ||||||
| return (f"{self._format_type()} of size {size}, " | ||||||
| f"value {self._format_buf(bufptr)}") | ||||||
| f"{nullness}value {self._format_buf(bufptr)}") | ||||||
|
|
||||||
|
|
||||||
| class DictionaryScalarPrinter(ScalarPrinter): | ||||||
|
|
@@ -1450,6 +1449,8 @@ def display_hint(self): | |||||
| return 'map' | ||||||
|
|
||||||
| def children(self): | ||||||
| if not self.is_valid: | ||||||
| return None | ||||||
| eval_fields = StdVector(self.type['children_']) | ||||||
| eval_values = StdVector(self.val['value']) | ||||||
| for field, value in zip(eval_fields, eval_values): | ||||||
|
|
@@ -1463,7 +1464,24 @@ def to_string(self): | |||||
| return f"{self._format_type()}" | ||||||
|
|
||||||
|
|
||||||
| class UnionScalarPrinter(ScalarPrinter): | ||||||
| class SparseUnionScalarPrinter(ScalarPrinter): | ||||||
| """ | ||||||
| Pretty-printer for arrow::UnionScalar and subclasses. | ||||||
| """ | ||||||
|
|
||||||
| def to_string(self): | ||||||
| type_code = self.val['type_code'].cast(gdb.lookup_type('int')) | ||||||
| if not self.is_valid: | ||||||
| return (f"{self._format_type()} of type {self.type}, " | ||||||
| f"type code {type_code}, null value") | ||||||
| eval_values = StdVector(self.val['value']) | ||||||
| child_id = self.val['child_id'].cast(gdb.lookup_type('int')) | ||||||
|
||||||
| return (f"{self._format_type()} of type code {type_code}, " | ||||||
| f"value {deref(eval_values[child_id])}") | ||||||
|
|
||||||
|
|
||||||
|
|
||||||
| class DenseUnionScalarPrinter(ScalarPrinter): | ||||||
| """ | ||||||
| Pretty-printer for arrow::UnionScalar and subclasses. | ||||||
|
||||||
| Pretty-printer for arrow::UnionScalar and subclasses. | |
| Pretty-printer for arrow::DenseUnionScalar and subclasses. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.