Skip to content

Commit 74fd2e7

Browse files
committed
chore(isthmus): minor refactoring
1 parent 142d372 commit 74fd2e7

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

isthmus/src/main/java/io/substrait/isthmus/SimpleExtensionToSqlOperator.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ public static List<SqlOperator> from(SimpleExtension.ExtensionCollection collect
3636

3737
public static List<SqlOperator> from(
3838
SimpleExtension.ExtensionCollection collection, RelDataTypeFactory typeFactory) {
39-
TypeConverter typeConverter = TypeConverter.DEFAULT;
39+
return from(collection, typeFactory, TypeConverter.DEFAULT);
40+
}
41+
42+
public static List<SqlOperator> from(
43+
SimpleExtension.ExtensionCollection collection,
44+
RelDataTypeFactory typeFactory,
45+
TypeConverter typeConverter) {
4046
// TODO: add support for windows functions
4147
return Stream.concat(
4248
collection.scalarFunctions().stream(), collection.aggregateFunctions().stream())

isthmus/src/main/java/io/substrait/isthmus/sql/SubstraitSqlToCalcite.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static RelRoot convertQuery(String sqlStatement, Prepare.CatalogReader ca
4848
* @param sqlStatement a SQL statement string
4949
* @param catalogReader the {@link Prepare.CatalogReader} for finding tables/views referenced in
5050
* the SQL statement
51-
* @param operatorTable the {@link SqlOperatorTable} for dynamic operators
51+
* @param operatorTable the {@link SqlOperatorTable} for controlling valid operators
5252
* @return a {@link RelRoot} corresponding to the given SQL statement
5353
* @throws SqlParseException if there is an error while parsing the SQL statement
5454
*/
@@ -97,7 +97,7 @@ public static RelRoot convertQuery(
9797
* @param sqlStatements a string containing one or more SQL statements
9898
* @param catalogReader the {@link Prepare.CatalogReader} for finding tables/views referenced in
9999
* the SQL statements
100-
* @param operatorTable the {@link SqlOperatorTable} for dynamic operators
100+
* @param operatorTable the {@link SqlOperatorTable} for controlling valid operators
101101
* @return a list of {@link RelRoot}s corresponding to the given SQL statements
102102
* @throws SqlParseException if there is an error while parsing the SQL statements
103103
*/

0 commit comments

Comments
 (0)