Skip to content

Latest commit

 

History

History
97 lines (75 loc) · 1.59 KB

File metadata and controls

97 lines (75 loc) · 1.59 KB

description: Methods for broadcasting a path in a tree.

Module: expression_impl.broadcast

View source on GitHub

Methods for broadcasting a path in a tree.

This provides methods for broadcasting a field anonymously (that is used in promote_and_broadcast), or with an explicitly given name.

Suppose you have an expr representing:

+
|
+-session*   (stars indicate repeated)
     |
     +-event*
     |
     +-val*-int64

session: {
  event: {}
  event: {}
  val: 10
  val: 11
}
session: {
  event: {}
  event: {}
  val: 20
}

Then:

broadcast.broadcast(expr, path.Path(["session","val"]), "event", "nv")

becomes:

+
|
+---session*   (stars indicate repeated)
       |
       +-event*
       |   |
       |   +---nv*-int64
       |
       +-val*-int64

session: {
  event: {
    nv: 10
    nv:11
  }
  event: {
    nv: 10
    nv:11
  }
  val: 10
  val: 11
}
session: {
  event: {nv: 20}
  event: {nv: 20}
  val: 20
}

Functions

broadcast(...)

broadcast_anonymous(...)