Skip to content

Commit

Permalink
refactor: use sqlconformance instead of sqlConformanceModeEnum in fea…
Browse files Browse the repository at this point in the history
…tureBoard (#125)
  • Loading branch information
vigneshc authored Jan 28, 2023
1 parent c4f94db commit 9c4ba27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion isthmus/src/main/java/io/substrait/isthmus/FeatureBoard.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.substrait.isthmus;

import io.substrait.isthmus.SubstraitRelVisitor.CrossJoinPolicy;
import org.apache.calcite.sql.validate.SqlConformance;
import org.apache.calcite.sql.validate.SqlConformanceEnum;
import org.immutables.value.Value;

Expand All @@ -27,7 +28,7 @@ public boolean allowsSqlBatch() {
* @return the selected built-in Calcite SQL compatibility mode.
*/
@Value.Default
public SqlConformanceEnum sqlConformanceMode() {
public SqlConformance sqlConformanceMode() {
return SqlConformanceEnum.DEFAULT;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import static org.junit.jupiter.api.Assertions.assertTrue;

import io.substrait.isthmus.SubstraitRelVisitor.CrossJoinPolicy;
import org.apache.calcite.sql.validate.SqlConformance;
import org.apache.calcite.sql.validate.SqlConformanceEnum;
import org.junit.jupiter.api.Test;
import picocli.CommandLine;
Expand Down Expand Up @@ -36,7 +37,8 @@ void customFeatureBoard() {
"SELECT * FROM foo");
FeatureBoard features = planEntryPoint.buildFeatureBoard();
assertTrue(features.allowsSqlBatch());
assertEquals(SqlConformanceEnum.SQL_SERVER_2008, features.sqlConformanceMode());
assertEquals(
(SqlConformance) SqlConformanceEnum.SQL_SERVER_2008, features.sqlConformanceMode());
assertEquals(CrossJoinPolicy.CONVERT_TO_INNER_JOIN, features.crossJoinPolicy());
}

Expand Down

0 comments on commit 9c4ba27

Please sign in to comment.