asolimando commented on a change in pull request #2613:
URL: https://github.com/apache/calcite/pull/2613#discussion_r765001237



##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -2399,6 +2399,21 @@ private void checkPredicates(RelOptCluster cluster, 
RelOptTable empTable,
     assertThat(RelMdUtil.linear(12, 0, 10, 100, 200), is(200d));
   }
 
+  // ----------------------------------------------------------------------
+  // Tests for getExpressionLineage
+  // ----------------------------------------------------------------------
+
+  private void assertExpressionLineage(
+      String sql, int columnIndex, String expected, String comment) {
+    RelNode rel = convertSql(sql);
+    RelMetadataQuery mq = rel.getCluster().getMetadataQuery();
+    RexNode ref = RexInputRef.of(columnIndex, rel.getRowType().getFieldList());
+    Set<RexNode> r = mq.getExpressionLineage(rel, ref);
+
+    assertEquals(expected, String.valueOf(r), "Lineage for expr '" + ref + "' 
in node '"
+        + rel + "'" + " for query '" + sql + "':n" + comment);

Review comment:
       Actually it was not my doing, it was `./gradlew autostyleApply` doing 
that:
   
   ```
        assertEquals(expected, String.valueOf(r), "Lineage for expr '" + ref + 
"' in node '"
   -        + rel + "'" + " for query '" + sql + "':\n" + comment);
   +        + rel + "'" + " for query '" + sql + "':n"
   +  + comment);
      }
   ```
   
   Looks like a bug to me.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to