title: Partial range query using Kafka Streams, RocksDB and Avro schema
body: <p>I have an avro schema named <code>CompositeKey</code> with fields of <code>&lt;userId: int, attribute: string&gt;</code>. Another avro schema named <code>SimpleValue</code>.</p>
  
  <p>Using Kafka Streams, I put them into a KeyValueStore using Avro serializer/deserializers.</p>
  
  <pre><code>myKeyValueStore.put(myCompositeKey, mySimpleValue);
  </code></pre>
  
  <p>Later on, using interactive queries I can <code>get</code> <code>userId, attribute</code> pairs one by one. But I'd like to also get all <code>attributes</code> belonging to a single <code>userId</code>. When I use,</p>
  
  <pre><code>store.range(
      new CompositeKey(userID, lowestPossibleAttribute), 
      new CompositeKey(userID, highestPossibleAttribute))
  </code></pre>
  
  <p>it does not return all attributes. I guess that is caused because underlying RocksDB sorts them like byte arrays and avro serialization format messes with that.</p>
  
  <p>Is there a way to do this partial range query using Avro in RocksDB? Otherwise I will have to store them with generated strings from Avro schema in the format of <code>"&lt;userId&gt;+&lt;attribute&gt;"</code>.</p>