[jira] [Commented] (CALCITE-4332) Improve error when planning rule produces a relational expression with wrong row type
[ https://issues.apache.org/jira/browse/CALCITE-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17215201#comment-17215201 ] Chunwei Lei commented on CALCITE-4332: -- I am working on it. > Improve error when planning rule produces a relational expression with wrong > row type > - > > Key: CALCITE-4332 > URL: https://issues.apache.org/jira/browse/CALCITE-4332 > Project: Calcite > Issue Type: Improvement > Components: core >Affects Versions: 1.26.0 >Reporter: Vladimir Sitnikov >Assignee: Chunwei Lei >Priority: Major > > Current code in {{VolcanoPlanner}}: > {code:java} > assert RelOptUtil.equal( > "rel rowtype", > rel.getRowType(), > "equivRel rowtype", > equivRel.getRowType(), > Litmus.THROW); > equivRel = ensureRegistered(equivRel, null); > {code} > The suggested changes: > 1) Use regular error {{IllegalArgumentException}} rather than an assertion > 2) Make sure the exception message contains fine-grained information on what > went wrong. For instance: {{name: non nullable -> nullable; description: > character -> int; ...}} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-4332) Improve error when planning rule produces a relational expression with wrong row type
[ https://issues.apache.org/jira/browse/CALCITE-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17213696#comment-17213696 ] Vladimir Sitnikov commented on CALCITE-4332: Thanks, it would be awesome > Improve error when planning rule produces a relational expression with wrong > row type > - > > Key: CALCITE-4332 > URL: https://issues.apache.org/jira/browse/CALCITE-4332 > Project: Calcite > Issue Type: Improvement > Components: core >Affects Versions: 1.26.0 >Reporter: Vladimir Sitnikov >Priority: Major > > Current code in {{VolcanoPlanner}}: > {code:java} > assert RelOptUtil.equal( > "rel rowtype", > rel.getRowType(), > "equivRel rowtype", > equivRel.getRowType(), > Litmus.THROW); > equivRel = ensureRegistered(equivRel, null); > {code} > The suggested changes: > 1) Use regular error {{IllegalArgumentException}} rather than an assertion > 2) Make sure the exception message contains fine-grained information on what > went wrong. For instance: {{name: non nullable -> nullable; description: > character -> int; ...}} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-4332) Improve error when planning rule produces a relational expression with wrong row type
[ https://issues.apache.org/jira/browse/CALCITE-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17213554#comment-17213554 ] Chunwei Lei commented on CALCITE-4332: -- [~vladimirsitnikov] if you don'mind, I would like to take over this issue. > Improve error when planning rule produces a relational expression with wrong > row type > - > > Key: CALCITE-4332 > URL: https://issues.apache.org/jira/browse/CALCITE-4332 > Project: Calcite > Issue Type: Improvement > Components: core >Affects Versions: 1.26.0 >Reporter: Vladimir Sitnikov >Priority: Major > > Current code in {{VolcanoPlanner}}: > {code:java} > assert RelOptUtil.equal( > "rel rowtype", > rel.getRowType(), > "equivRel rowtype", > equivRel.getRowType(), > Litmus.THROW); > equivRel = ensureRegistered(equivRel, null); > {code} > The suggested changes: > 1) Use regular error {{IllegalArgumentException}} rather than an assertion > 2) Make sure the exception message contains fine-grained information on what > went wrong. For instance: {{name: non nullable -> nullable; description: > character -> int; ...}} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-4332) Improve error when planning rule produces a relational expression with wrong row type
[ https://issues.apache.org/jira/browse/CALCITE-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17212599#comment-17212599 ] Julian Hyde commented on CALCITE-4332: -- Sounds fine. The fix should include a test that a given action produces a given error message. > Improve error when planning rule produces a relational expression with wrong > row type > - > > Key: CALCITE-4332 > URL: https://issues.apache.org/jira/browse/CALCITE-4332 > Project: Calcite > Issue Type: Improvement > Components: core >Affects Versions: 1.26.0 >Reporter: Vladimir Sitnikov >Priority: Major > > Current code in {{VolcanoPlanner}}: > {code:java} > assert RelOptUtil.equal( > "rel rowtype", > rel.getRowType(), > "equivRel rowtype", > equivRel.getRowType(), > Litmus.THROW); > equivRel = ensureRegistered(equivRel, null); > {code} > The suggested changes: > 1) Use regular error {{IllegalArgumentException}} rather than an assertion > 2) Make sure the exception message contains fine-grained information on what > went wrong. For instance: {{name: non nullable -> nullable; description: > character -> int; ...}} -- This message was sent by Atlassian Jira (v8.3.4#803005)