-
Notifications
You must be signed in to change notification settings - Fork 6.8k
concat
: Handle mixed Tensor types for structs
#54386
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
Conversation
Signed-off-by: Srinath Krishnamachari <[email protected]>
Signed-off-by: Srinath Krishnamachari <[email protected]>
Signed-off-by: Srinath Krishnamachari <[email protected]>
Signed-off-by: Srinath Krishnamachari <[email protected]>
Signed-off-by: Srinath Krishnamachari <[email protected]>
concat
: Handle mixed Tensor types for structs
Signed-off-by: Srinath Krishnamachari <[email protected]>
Signed-off-by: Srinath Krishnamachari <[email protected]>
Signed-off-by: Srinath Krishnamachari <[email protected]>
Important Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services. |
Signed-off-by: Srinath Krishnamachari <[email protected]>
Signed-off-by: Srinath Krishnamachari <[email protected]>
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
2 similar comments
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Signed-off-by: Srinath Krishnamachari <[email protected]>
Signed-off-by: Srinath Krishnamachari <[email protected]>
|
||
|
||
def test_arrow_concat_single_block(): | ||
def test_arrow_concat_single_block(simple_concat_data): |
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.
Added pytest fixtures
|
||
|
||
def test_arrow_concat_basic(): | ||
def test_arrow_concat_basic(basic_concat_blocks, basic_concat_expected): |
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.
Added pytest fixtures
# Check equivalence. | ||
expected = pa.concat_tables(ts) | ||
assert out == expected | ||
|
||
|
||
def test_arrow_concat_null_promotion(): | ||
def test_arrow_concat_null_promotion(null_promotion_blocks, null_promotion_expected): |
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.
Added pytest fixtures
# Check equivalence. | ||
expected = pa.concat_tables(ts, promote=True) | ||
assert out == expected | ||
|
||
|
||
def test_arrow_concat_tensor_extension_uniform(): | ||
def test_arrow_concat_tensor_extension_uniform( |
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.
Added pytest fixtures
|
||
# Check equivalence. | ||
expected = pa.concat_tables(ts, promote=True) | ||
assert out == expected | ||
|
||
|
||
def test_arrow_concat_tensor_extension_variable_shaped(): | ||
def test_arrow_concat_tensor_extension_variable_shaped( |
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.
Added pytest fixtures
assert "objects and tensors" in str(exc_info.value.__cause__) | ||
|
||
|
||
def test_unify_schemas(): | ||
def test_unify_schemas(unify_schemas_basic_schemas, unify_schemas_multicol_schemas): |
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.
Added pytest fixtures
pa.field("A", pa.int32(), nullable=True), | ||
] | ||
) | ||
def test_unify_schemas_type_promotion(unify_schemas_type_promotion_data): |
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.
Added pytest fixtures
df = pd.DataFrame({"one": [10, 11, 12], "two": [11, 12, 13], "three": [14, 15, 16]}) | ||
table = pa.Table.from_pandas(df) | ||
block_accessor = BlockAccessor.for_block(table) | ||
def test_arrow_block_select(block_select_data): |
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.
Added pytest fixtures
|
||
with pytest.raises(ValueError): | ||
block = block_accessor.select([lambda x: x % 3, "two"]) | ||
|
||
|
||
def test_arrow_block_slice_copy(): | ||
def test_arrow_block_slice_copy(block_slice_data): |
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.
Added pytest fixtures
@@ -917,12 +775,12 @@ def check_for_copy(table1, table2, a, b, is_copy): | |||
check_for_copy(table, table2, a, b, is_copy=False) | |||
|
|||
|
|||
def test_arrow_block_slice_copy_empty(): | |||
def test_arrow_block_slice_copy_empty(block_slice_data): |
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.
Added pytest fixtures
Signed-off-by: Srinath Krishnamachari <[email protected]>
Signed-off-by: Lonnie Liu <[email protected]>
Why are these changes needed?
concat
: Handle mixed Tensor types for structsunify_schemas
unify_schemas
on itself.concat
_align_struct_fields
is invoked to handle missing fields and aligned schemas. Here handle Tensors type mismatch in_backfill_missing_fields
.Tests
concat
of tables with structs & tensors coverage.unify_schema
coverage.Related issue number
"Closes #54186"
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.