vlsi commented on a change in pull request #2613:
URL: https://github.com/apache/calcite/pull/2613#discussion_r764706775
##########
File path:
core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewJoinRule.java
##########
@@ -260,17 +260,20 @@
: topProject.getProjects();
List<RexNode> exprsLineage = new ArrayList<>(exprs.size());
for (RexNode expr : exprs) {
- Set<RexNode> s = mq.getExpressionLineage(node, expr);
- if (s == null) {
+ Set<RexNode> lineages = mq.getExpressionLineage(node, expr);
+ if (lineages == null) {
// Bail out
return null;
}
- assert s.size() == 1;
+ if (lineages.size() != 1) {
+ throw new IllegalStateException("We only support project - filter -
join, "
+ + "thus expression lineage should map to a single expression, got:
" + lineages);
Review comment:
Does it make sense to include the input `expr` and or `node` into the
message as well?
--
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]