Skip to content

Releases: mbrobbel/narrow

v0.4.0

22 Jan 15:59
Compare
Choose a tag to compare

Chore

  • fix clippy 1.75.0 warnings
    Fixes new 1.75.0 clippy warnings.
  • enable more lints

New Features

  • convert StructArray from arrow_array::StructArray
    This enables roundtripping through a parquet file.
  • convert StructArray from arrow_array::StructArray
  • add arrow-rs interop support for FixedSizeListArray
    Adds support for interop between narrow::array::FixedSizeListArray and
    arrow_array::FixedSizeListArray.
  • add arrow-rs interop support for FixedSizeListArray
  • add FixedSizeListArray
  • add non-nullable to nullable conversion

Bug Fixes

  • bound on ArrayType implementation for arrays
    The FixedSize bound was used when arrays were stored in
    FixedSizePrimitiveArray.
  • clippy warning
  • remove comment
  • remove FixedSize impl for tuple
  • offset extend impl for nullable data
    For nullable data it should also flatten the option iterator.
  • offset extend impl for nullable data

New Features (BREAKING)

  • add arrow-rs features for buffer and array interop
    Adds interop with arrow-rs. The added parquet example demonstrates
    what this enables.

  • add FixedSizeListArray

  • add OffsetElement and UnionType to the Array GAT of ArrayType
    This adds generics for offset element type (i32 or i64) and union
    layout (sparse or dense) to the Array type constructor of the
    ArrayType trait.

    This is not ideal without default types for the generics in a generic
    associated type, but the alternatives are worse (making ArrayType
    generic over these types with defaults).

  • add OffsetElement and UnionType to the Array GAT of ArrayType

  • add item associated type to Unit trait
    To support using NullArray for unit variants of enums in
    UnionArrays, this adds an Item associated type to the Unit trait,
    which converts into the type implementing Unit, allowing code
    generation of types for unit enum variants which implement Unit and
    convert to instances of the variants of the original enum.

  • add item associated type to Unit trait

Commit Statistics

Commit Details

view details
  • #100
    • Add arrow-rs features for buffer and array interop (374aedf)
  • #102
    • Add non-nullable to nullable conversion (bfc1399)
  • #107
  • #108
    • Add item associated type to Unit trait (7db53c2)
  • #109
    • Add OffsetElement and UnionType to the Array GAT of ArrayType (3b60bbe)
  • #110
  • #117
    • Add arrow-rs interop support for FixedSizeListArray (b5210c7)
  • #118
    • Convert StructArray from arrow_array::StructArray (fcb49b3)
  • #123
    • Bound on ArrayType implementation for arrays (fabc404)
  • #136
    • Fix clippy 1.75.0 warnings (117a4f3)
  • #98
    • Offset extend impl for nullable data (10aacdf)
  • Uncategorized
    • Convert StructArray from arrow_array::StructArray (b4c49b0)
    • Add missing tests (6c703bd)
    • Clippy warning (54eda3c)
    • Add arrow-rs interop support for FixedSizeListArray (b4d4038)
    • Add direct RecordBatch conversion for StructArray (8f0c5b2)
    • Remove a comment (d9c076f)
    • Add parquet example (094f3a0)
    • Generalize more string array methods (bc0f459)
    • Generalize stringarray extend impl (66b4970)
    • Split out implementations and add more tests (ea99db7)
    • Fix some clippy warnings (25c7367)
    • Change interaction with ArrowNativeType (6c43438)
    • Merge branch 'main' into arrow-array (8ee0a2c)
    • Add nested test (63c6e8d)
    • Add IntoIterator implementation, change ArrayType for [T: FixedSize; N] (b631643)
    • Add FixedSizeListArray (e84f00c)
    • Add OffsetElement and UnionType to the Array GAT of ArrayType (a3613c5)
    • Add item associated type to Unit trait (3a7f327)
    • Fix docs (d440189)
    • Use ArrayBuffer<1> for SingleBuffer (34db73e)
    • Add indexing to Offset (a84ee37)
    • Add Index trait (97747b5)
    • Remove comment (59cdb4a)
    • Enable more lints (11c8970)
    • Merge branch 'main' into arrow-array (8ddf760)
    • Add non-nullable to nullable conversion (11f75e0)
    • Add BooleanArray conversion (21547b1)
    • Rename feature to arrow-rs (afbb962)
    • Move arrow-rs interop to arrow module (e39ad3b)
    • Fix warning (c5c09f0)
    • Merge branch 'main' into arrow-array (42ba214)
    • Remove FixedSize impl for tuple (b6b922c)
    • Implicit conversion to ArrowBuffer from VecBuffer is now supported (9494ce2)
    • Merge branch 'main' into arrow-array (bdb17bc)
    • Add BufferType implementation for arrow_buffer::ScalarBuffer (44e3567)
    • Make conversion generic over buffer type (e2b40f1)
    • Add arrow-array feature for zero-copy array interop (26e746c)
    • Use BufferBuilder abstraction (7b5dab9)
    • Offset extend impl for nullable data (60fb809)
    • Some fixes and tests (3cfe877)
    • Setup arrow-buffer interop (4d0d333)

narrow-derive v0.4.0

22 Jan 15:59
Compare
Choose a tag to compare

Chore

  • bump proc-macro-crate from 3.0.0 to 3.1.0
    Bumps proc-macro-crate from
    3.0.0 to 3.1.0.

    Release notes

    Sourced from proc-macro-crate's releases.

    v3.0.1

    What's Changed

    New Contributors

    Full Changelog: bkchr/proc-macro-crate@v3.0.0...v3.0.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't
    alter it yourself. You can also trigger a rebase manually by commenting
    @dependabot rebase.

  • bump syn from 2.0.43 to 2.0.48

  • bump proc-macro-crate from 2.0.1 to 3.0.0
    Bumps proc-macro-crate from
    2.0.1 to 3.0.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't
    alter it yourself. You can also trigger a rebase manually by commenting
    @dependabot rebase.

  • bump quote from 1.0.33 to 1.0.35
    Bumps quote from 1.0.33 to 1.0.35.

    Release notes

    Sourced from quote's releases.

    1.0.35

    • Update proc-macro2 to fix caching issue when using a rustc-wrapper such as sccache

    1.0.34

    • Documentation improvements
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't
    alter it yourself. You can also trigger a rebase manually by commenting
    @dependabot rebase.

  • bump syn from 2.0.41 to 2.0.43
    Bumps syn from 2.0.41 to 2.0.43.

    Release notes

    Sourced from syn's releases.

    2.0.43

    • Insert trailing comma if not already present when printing a 1-tuple in pattern position (#1553)

    2.0.42

    • Documentation improvements
    Commits
    • 95ee052 Release 2.0.43
    • 7383e81 Merge pull request #1559 from dtolnay/pattuple
    • 712fde5 Fix ToTokens for PatTuple to insert trailing comma
    • ed9b94e Merge pull request #1558 from dtolnay/tupletests
    • ec8517b Add tuple comma tests
    • 3cf16c7 Merge pull request #1557 from dtolnay/snapshotparsequote
    • 553549f Generalize snapshot parsing to types that do not implement Parse
    • f9ad833 Merge pull request #1556 from dtolnay/punctuatedsnapshot
    • 131b40b Debug impl for punctuated::Pairs superseded by Punctuated
    • 3f12d65 Include punctuation tokens in snapshot tests containing Punctuated
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't
    alter it yourself. You can also trigger a rebase manually by commenting
    @dependabot rebase.

  • bump syn from 2.0.40 to 2.0.41
    Bumps syn from 2.0.40 to 2.0.41.

    Release notes

    Sourced from syn's releases.

    2.0.41

    • Support parsing syn::Field in parse_quote! (#1548)
    Commits
Read more

v0.3.4

01 Aug 20:28
Compare
Choose a tag to compare

Bug Fixes

  • ArrayType derive for named structs
    #[derive(ArrayType, Default)]
    struct Bar<T> {
        a: u32,
        b: Option<bool>,
        c: T,
    }
    
    let input = [
        Some(Bar {
            a: 1,
            b: Some(false),
            c: None,
        }),
        None,
        Some(Bar {
            a: 2,
            b: None,
            c: Some(()),
        }),
    ];
    
    let array = input.into_iter().collect::<StructArray<Bar<_>, true>>();
    assert_eq!(array.len(), 3);
    assert_eq!(array.is_valid(0), Some(true));
    assert_eq!(array.is_null(1), Some(true));
    assert_eq!(array.is_valid(2), Some(true));
    
    let int_array = &array.0.as_ref().a;
    assert_eq!(int_array.0.as_slice(), &[1, Default::default(), 2]);
    
    let bool_array = &array.0.as_ref().b;
    assert_eq!(
        bool_array.into_iter().collect::<Vec<_>>(),
        &[Some(false), None, None]
    );
    
    let null_array = &array.0.as_ref().c;
    assert_eq!(null_array.is_null(0), Some(true));
    assert_eq!(null_array.is_null(1), Some(true));
    assert_eq!(null_array.is_valid(2), Some(true));
    
    let input = [
        Some(Bar {
            a: 1,
            b: None,
            c: false,
        }),
        None,
    ];
    let array = input.into_iter().collect::<StructArray<Bar<_>, true>>();
    assert_eq!(array.len(), 2);

Commit Statistics

  • 3 commits contributed to the release over the course of 4 calendar days.
  • 4 days passed between releases.
  • 1 commit was understood as conventional.
  • 1 unique issue was worked on: #82

Commit Details

view details
  • #82
    • ArrayType derive for named structs (8fb5f2f)
  • Uncategorized
    • Consolidate the common items for the different field types (427bebb)
    • Add derive support for named structs (538c16c)

narrow-derive v0.3.4

01 Aug 20:28
Compare
Choose a tag to compare

Bug Fixes

  • ArrayType derive for named structs
    #[derive(ArrayType, Default)]
    struct Bar<T> {
        a: u32,
        b: Option<bool>,
        c: T,
    }
    
    let input = [
        Some(Bar {
            a: 1,
            b: Some(false),
            c: None,
        }),
        None,
        Some(Bar {
            a: 2,
            b: None,
            c: Some(()),
        }),
    ];
    
    let array = input.into_iter().collect::<StructArray<Bar<_>, true>>();
    assert_eq!(array.len(), 3);
    assert_eq!(array.is_valid(0), Some(true));
    assert_eq!(array.is_null(1), Some(true));
    assert_eq!(array.is_valid(2), Some(true));
    
    let int_array = &array.0.as_ref().a;
    assert_eq!(int_array.0.as_slice(), &[1, Default::default(), 2]);
    
    let bool_array = &array.0.as_ref().b;
    assert_eq!(
        bool_array.into_iter().collect::<Vec<_>>(),
        &[Some(false), None, None]
    );
    
    let null_array = &array.0.as_ref().c;
    assert_eq!(null_array.is_null(0), Some(true));
    assert_eq!(null_array.is_null(1), Some(true));
    assert_eq!(null_array.is_valid(2), Some(true));
    
    let input = [
        Some(Bar {
            a: 1,
            b: None,
            c: false,
        }),
        None,
    ];
    let array = input.into_iter().collect::<StructArray<Bar<_>, true>>();
    assert_eq!(array.len(), 2);

Commit Statistics

  • 3 commits contributed to the release over the course of 4 calendar days.
  • 4 days passed between releases.
  • 1 commit was understood as conventional.
  • 1 unique issue was worked on: #82

Commit Details

view details
  • #82
    • ArrayType derive for named structs (8fb5f2f)
  • Uncategorized
    • Consolidate the common items for the different field types (427bebb)
    • Add derive support for named structs (538c16c)

v0.3.3

27 Jul 21:55
Compare
Choose a tag to compare

Bug Fixes

  • ArrayType derive for tuple structs
    #[derive(ArrayType, Default)]
    struct Foo<'a>(u32, u16, &'a str);
    
    #[derive(ArrayType, Default)]
    struct Bar<'a>(Foo<'a>);
    
    #[derive(ArrayType, Default)]
    struct FooBar<'a, T>(Bar<'a>, T);
    
    let input = [
        FooBar(Bar(Foo(1, 2, "n")), false),
        FooBar(Bar(Foo(1, 2, "arrow")), false),
    ];
    let array = input.into_iter().collect::<StructArray<FooBar<_>>>();
    assert_eq!(array.len(), 2);
    
    let input = vec![
        Some(vec![Some(FooBar(Bar(Foo(42, 0, "!"), 1234))]),
        None,
        Some(vec![None]),
        Some(vec![None, None]),
    ];
    let array = input
        .into_iter()
        .collect::<VariableSizeListArray<StructArray<FooBar<_>, true>, true>>();
    assert_eq!(array.len(), 4);
  • ArrayType derive for tuple structs

Commit Statistics

  • 2 commits contributed to the release.
  • 2 commits were understood as conventional.
  • 1 unique issue was worked on: #80

Commit Details

view details
  • #80
    • ArrayType derive for tuple structs (9a48422)
  • Uncategorized
    • ArrayType derive for tuple structs (1db19ad)

v0.3.2

27 Jul 14:36
Compare
Choose a tag to compare

Bug Fixes

  • ArrayType derive for unit structs
    Add support to derive ArrayType for unit structs:
    #[derive(ArrayType, Copy, Clone, Default)]
    struct Foo;
    
    let array = [Foo; 5].into_iter().collect::<StructArray<Foo>>();
    assert_eq!(array.len(), 5);
    
    let array = [Some(Foo); 5].into_iter().collect::<StructArray<Foo, true>>();
    assert_eq!(array.len(), 5);
    assert!(array.all_valid());
  • ArrayType derive for unit structs

Commit Statistics

  • 3 commits contributed to the release.
  • 2 commits were understood as conventional.
  • 1 unique issue was worked on: #79

Commit Details

view details
  • #79
    • ArrayType derive for unit structs (a7a3f79)
  • Uncategorized

v0.3.1

27 Jul 11:06
Compare
Choose a tag to compare

Chore

  • fix gh release

Commit Statistics

  • 1 commit contributed to the release.
  • 1 commit was understood as conventional.
  • 0 issues like '(#ID)' were seen in commit messages

Commit Details

view details
  • Uncategorized

narrow-derive v0.3.3

27 Jul 21:55
Compare
Choose a tag to compare

Bug Fixes

  • ArrayType derive for tuple structs
    #[derive(ArrayType, Default)]
    struct Foo<'a>(u32, u16, &'a str);
    
    #[derive(ArrayType, Default)]
    struct Bar<'a>(Foo<'a>);
    
    #[derive(ArrayType, Default)]
    struct FooBar<'a, T>(Bar<'a>, T);
    
    let input = [
        FooBar(Bar(Foo(1, 2, "n")), false),
        FooBar(Bar(Foo(1, 2, "arrow")), false),
    ];
    let array = input.into_iter().collect::<StructArray<FooBar<_>>>();
    assert_eq!(array.len(), 2);
    
    let input = vec![
        Some(vec![Some(FooBar(Bar(Foo(42, 0, "!"), 1234))]),
        None,
        Some(vec![None]),
        Some(vec![None, None]),
    ];
    let array = input
        .into_iter()
        .collect::<VariableSizeListArray<StructArray<FooBar<_>, true>, true>>();
    assert_eq!(array.len(), 4);
  • ArrayType derive for tuple structs

Commit Statistics

  • 2 commits contributed to the release.
  • 2 commits were understood as conventional.
  • 1 unique issue was worked on: #80

Commit Details

view details
  • #80
    • ArrayType derive for tuple structs (9a48422)
  • Uncategorized
    • ArrayType derive for tuple structs (1db19ad)

narrow-derive v0.3.2

27 Jul 14:36
Compare
Choose a tag to compare

Bug Fixes

  • ArrayType derive for unit structs
    Add support to derive ArrayType for unit structs:
    #[derive(ArrayType, Copy, Clone, Default)]
    struct Foo;
    
    let array = [Foo; 5].into_iter().collect::<StructArray<Foo>>();
    assert_eq!(array.len(), 5);
    
    let array = [Some(Foo); 5].into_iter().collect::<StructArray<Foo, true>>();
    assert_eq!(array.len(), 5);
    assert!(array.all_valid());
  • ArrayType derive for unit structs

Commit Statistics

  • 3 commits contributed to the release.
  • 2 commits were understood as conventional.
  • 1 unique issue was worked on: #79

Commit Details

view details
  • #79
    • ArrayType derive for unit structs (a7a3f79)
  • Uncategorized
    • Merge branch 'main' into unit-struct-derive (09e3183)
    • ArrayType derive for unit structs (e951ed1)

narrow-derive v0.3.1

27 Jul 11:06
Compare
Choose a tag to compare

Chore

  • fix gh release

Commit Statistics

  • 1 commit contributed to the release.
  • 1 commit was understood as conventional.
  • 0 issues like '(#ID)' were seen in commit messages

Commit Details

view details
  • Uncategorized