Skip to content

Releases: bullet-db/bullet-record

Log4j provided and only Slf4j

11 Jan 22:02
Compare
Choose a tag to compare

We now only have a compile time dependency on slf4j-api. The binding to log4j is marked as provided so dependent projects can use whatever logging implementation they want. If log4j is desired, then those projects can depend on the binding and mark it as as scope compile.

Type hinting

21 Sep 22:09
Compare
Choose a tag to compare

This release adds these new interfaces to BulletRecord"

  1. A new BulletRecord#typedGet(String, Type) abstract method is added
  2. BulletRecord#typedGet(String) is no longer abstract and calls BulletRecord#typedGet(String, Type) with Type#UNKNOWN.
  3. The various map and list accessing typedGet methods now also have a hint parameter
  4. All subclasses can now implement typedGet(String, Type)

This change lets us optimize getting data out of the record when we know the type for sure.

Unknowns as first class and support for deeper types

30 Jul 17:23
Compare
Choose a tag to compare

This release changes:

  1. The TypedObject(Type, Serializable) constructor now figures out the type if the passed in type was Type#UNKNOWN
  2. The behavior of Type discovery in Type#getType(Object) is changed. For container of containers (e.g. INTEGER_MAP_LIST or STRING_MAP_MAP), the discovered type can now be UNKNOWN_MAP, UNKNOWN_LIST, UNKNOWN_MAP_MAP, UNKNOWN_MAP_LIST in many more cases. Previously, this code looked for the first type that we support in these containers. Now, unless all the types in the container match this one type, the corresponding UNKNOWN container type is returned instead. This also has the behavior that maps inside containers whose types can't be discovered (if they're empty or only contain null values) cause the entire collection to discovered as the UNKNOWN container type. This differs from before where the discovery would skip these objects whose type can't be discovered and seek for the first valid one.

These two changes basically make UNKNOWN containers usable in Bullet. The use-case for this is sticking objects into a BulletRecord that nest deeper than the types we support. Bullet itself will recognize them appropriately as UNKNOWN_MAP_MAP or UNKNOWN_MAP_LIST and will let you extract fields up to the level we do recognize. If those extracted fields are types we support, then Bullet can still operate on them! The change in 1 above causes these extracted UNKNOWNs to have their Type discovered and fix itself.

This change will affect both TypedBulletRecord and UntypedBulletRecord as BulletRecord#typedGet will now discover types for UNKNOWN containers

LazyBulletAvro does not force a SerDe cycle when copy constructing

30 Jun 02:40
Compare
Choose a tag to compare

The LazyBulletAvro copy constructor invoked in the Avro Bullet Record copy method forced the target LazyBulletAvro to serialize and deserialize itself. While this effectively deep-copied, this is inefficient in Bullet when a base record is copied per query. This change makes the LazyBulletAvro force deserialize the source and shallow copy the map instead.

Exposes LazyBulletAvro interfaces to stick in other Avros

13 May 20:14
Compare
Choose a tag to compare

This release exposes the SerDes in LazyBulletAvro so a subclass can plug in its own Avro instead of a BulletAvro. The relevant constructors to use a new LazyBulletAvro have also been added to UntypedAvroBulletRecord and TypedAvroBulletRecord.

First release using Screwdriver

27 Apr 18:39
Compare
Choose a tag to compare

First release on Maven Central - Bintray EOL

22 Apr 18:59
Compare
Choose a tag to compare

No changes to source - minor Javadoc cleanup

Ternary Logic

30 Oct 18:01
Compare
Choose a tag to compare

This release adds ternary logic support and changes the return type for containsKey, containsValue, compareTo, equalTo in TypedObject to be the boxed types.

  • TypedObject no longer implements Comparable since TypedObject#compareTo returns Integer instead of an int to be able return NULL
  • TypedObject#equalTo now returns a Boolean to return NULL
  • Type#canCompare now returns false if either Type is Type.NULL
  • TypedObject#containsKey now returns Boolean and returns true if the key was found as before. It returns NULL if the key was not found within the type but null was (or if a nested MAP itself was null). It returns false otherwise.
  • TypedObject#containsValue now returns Boolean and returns true if the value was found as before. It returns NULL if the value was not found but null was. It returns false otherwise.

First Major Release - TypeSystem, Typed Bullet Records, Schemas and more!

04 Jun 19:32
Compare
Choose a tag to compare

This marks the first major release of Bullet Record as part of the full Expression rewrite.

  1. It moves and fully revamps the TypeSystem.java and Type.java from bullet-db/bullet-core to bullet-record since typing is now fundamental in Bullet and supporting typing in the Bullet Record is necessary. The types themselves have been extended to support the all container types with subtypes (such as INTEGER_MAP, DOUBLE_MAP_MAP or INTEGER_MAP_LIST). Casting is supported in full with safe casting and force casting available separately. The TypedObject has also been extended to support the Types better with better comparators and many many other utility functions.

  2. The Avro and Simple Bullet Records have now been moved into their own packages com.yahoo.bullet.record.avro and com.yahoo.bullet.record.simple respectively. New Typed versions of these have been added that natively support types.

  3. There are numerous changes to BulletRecord
    3.1 It is now serializable
    3.2 We provide two flavors called TypedBulletRecord and UntypedBulletRecord. Both records work with types but the untyped one will need to figure out types at run-time, which would be a performance drop.
    3.3 The recommended way to add and remove objects from the BulletRecord is to use typedSet and typedGet, although most of the older set methods are still supported.
    3.4. New utility methods such as copy or making a read-only view of the data are added

  4. Schema support has been added with full support for the new type system. This will serve as the basis for type-checking in BQL and used in the API for serving schemas.

More sets in BulletRecord

21 Nov 23:42
Compare
Choose a tag to compare

This release provides more set methods in BulletRecord:

set(String, BulletRecord, String, int, String)
set(String, BulletRecord, String, String, String)
forceSet(String, Object)

The first two now allow you to copy an item from a Map inside a List or a Map inside a Map in another BulletRecord. The forceSet method now allows you to set whatever you want in a BulletRecord without regard for type safety (previously, barring type erasure, had let you write clean BulletRecord insert operations). You can use this method now to set anything as long as your record implementation allows it or if you know the type of the object but can't be bothered to cast or figure out which of the exact correct types it is.