Skip to content

Commit

Permalink
test(isthmus): add docstring to CollationRelWriter - pr suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
yassram committed Jan 9, 2025
1 parent 060b960 commit 711828b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.List;
import org.apache.calcite.rel.RelCollation;
import org.apache.calcite.rel.RelNode;
import org.apache.calcite.rel.externalize.RelWriterImpl;
import org.apache.calcite.sql.SqlExplainLevel;
Expand All @@ -25,6 +26,10 @@ public class ComplexSortTest extends PlanTestBase {
final SubstraitToCalcite substraitToCalcite =
new SubstraitToCalcite(EXTENSION_COLLECTION, typeFactory);

/**
* A {@link RelWriterImpl} that annotates each {@link RelNode} with its {@link RelCollation} trait
* information. A {@link RelNode} is only annotated if its {@link RelCollation} is not empty.
*/
public static class CollationRelWriter extends RelWriterImpl {
public CollationRelWriter(StringWriter sw) {
super(new PrintWriter(sw), SqlExplainLevel.EXPPLAN_ATTRIBUTES, false);
Expand Down

0 comments on commit 711828b

Please sign in to comment.