substrait icon indicating copy to clipboard operation
substrait copied to clipboard

Questions about exchangeKind of ExchangeRel

Open whutjs opened this issue 1 year ago • 5 comments

I am trying to add support in Isthmus for converting Apache Calcite LogicalExchange, as what I described in https://github.com/substrait-io/substrait-java/issues/153. But I run into some problems about how to map the types of exchange from Calcite to Substrait.

In Apache Calcite, there are 6 types of exchange:

  1. BROADCAST_DISTRIBUTED;
  2. HASH_DISTRIBUTED;
  3. RANDOM_DISTRIBUTED;
  4. RANGE_DISTRIBUTED;
  5. ROUND_ROBIN_DISTRIBUTED;
  6. SINGLETON;

In Substrait, there are 5 types of exchange:

  1. Scatter;
  2. Single Bucket;
  3. Multi Bucket;
  4. Broadcast;
  5. Round Robin;

So my questions are:

  • What are single and multi bucket exchanges in Substrait? What are the corresponding exchange types in Calcite?
  • Is hash distributed exchange in Calcite corresponding to the scatter exchange in Substrait?

Thanks in advance!

whutjs avatar Jul 13 '23 11:07 whutjs