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

TansferPair doesn't preserve nullability of children in struct vectors. #3355

Closed
FiV0 opened this issue May 6, 2024 · 2 comments
Closed
Labels
arrow Issues related to arrow upstream. bug Something isn't working

Comments

@FiV0
Copy link
Contributor

FiV0 commented May 6, 2024

Only changing nullability of struct vector currently also results in the children potentially changing nullability

    @Test
    fun `test non nullability preserved in children` () {
        val intField = Field("int", FieldType.notNullable(MinorType.BIGINT.type), emptyList())
        val structField = Field("my-struct", FieldType.notNullable(STRUCT_TYPE), listOf(intField))
        val vector = structField.createVector(al)

        val newVector = vector
            .getTransferPair(Field(structField.name, FieldType.nullable(structField.type), structField.children), al)
            .also { it.transfer() }
            .to as FieldVector

        // passes
        assertEquals(structField.children[0], intField)
        // fails
        assertEquals(newVector.field.children[0], intField)
    }
@FiV0 FiV0 added bug Something isn't working arrow Issues related to arrow upstream. labels May 6, 2024
@FiV0 FiV0 self-assigned this May 16, 2024
@FiV0
Copy link
Contributor Author

FiV0 commented May 16, 2024

Raised upstream apache/arrow#41686

@FiV0 FiV0 removed their assignment May 16, 2024
@FiV0
Copy link
Contributor Author

FiV0 commented May 24, 2024

Fixed upstream apache/arrow#41785

@FiV0 FiV0 closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Issues related to arrow upstream. bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

1 participant