danny0405 commented on a change in pull request #2382:
URL: https://github.com/apache/calcite/pull/2382#discussion_r606047402
##########
File path: core/src/test/java/org/apache/calcite/test/SqlToRelTestBase.java
##########
@@ -796,6 +853,43 @@ public void assertConvertsTo(
diffRepos.assertEquals("plan", plan, actual);
}
+ public RexNode convertExprToRex(String expr) {
+ Objects.requireNonNull(expr, "expr");
+ final SqlNode sqlQuery;
+ try {
+ sqlQuery = parseExpression(expr);
+ } catch (RuntimeException | Error e) {
+ throw e;
+ } catch (Exception e) {
+ throw TestUtil.rethrow(e);
+ }
+ final RelDataTypeFactory typeFactory = getTypeFactory();
+ final Prepare.CatalogReader catalogReader =
Review comment:
Can we reuse the logic for creating `SqlToRelConverter` ?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]