MemStreamBuilder streamBuilder = new MemStreamBuilder("s");
// Select a user-attached "attribute" of the stream.
streamBuilder.addField(new TypedField("a", Type.getNullable(Type.TypeName.INT)));
Event e = new EventImpl("1".getBytes());
e.set("attr", "val".getBytes());
streamBuilder.addEvent(e);
StreamSymbol stream = streamBuilder.build();
runFreeSelectTest(stream, "SELECT #attr AS a FROM s",
Collections.singletonList(new Pair<String, Object>(