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

Un support null element for array #11

Closed
gcvirus opened this issue Mar 3, 2019 · 3 comments
Closed

Un support null element for array #11

gcvirus opened this issue Mar 3, 2019 · 3 comments

Comments

@gcvirus
Copy link

gcvirus commented Mar 3, 2019

Test case is follow:

@Test
public void testNullElementArray () {
        // given
        Schema arrayRecordSchema = Schema.createArray(Schema.createUnion(Schema.create(Schema.Type.STRING)
                , Schema.create(Schema.Type.NULL)));

        List<Object> records = new ArrayList<Object>();
        records.add(null);
        records.add(null);
        records.add(null);

        // when
        List<Object> array = decodeRecord(arrayRecordSchema, arrayRecordSchema,
                specificDataAsDecoder(records, arrayRecordSchema));

        // then
        Assert.assertEquals(3, array.size());
        Assert.assertNull(array.get(0));
        Assert.assertNull(array.get(1));
        Assert.assertNull(array.get(2));
    }
@dervan
Copy link
Contributor

dervan commented Mar 5, 2019

Hi,
thank you for pointing that out - we indeed had a small bug in handling null array elements. Fix is already on its way.

@flowenol
Copy link
Contributor

Hi,

Release 1.0.4 which fixes this bug is already available.

@gcvirus
Copy link
Author

gcvirus commented Apr 10, 2019

thanks

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

No branches or pull requests

3 participants