Search in sources :

Example 1 with RelToTrinoConverter

use of com.linkedin.coral.trino.rel2trino.RelToTrinoConverter in project coral by linkedin.

the class TrinoToRelConverterTest method testSupport.

@Test(dataProvider = "support")
public void testSupport(String trinoSql, String expectedRelString, String expectedSql) {
    RelNode relNode = trinoToRelConverter.convertSql(trinoSql);
    assertEquals(relToStr(relNode), expectedRelString);
    RelToTrinoConverter relToTrinoConverter = new RelToTrinoConverter();
    // Convert rel node back to Sql
    String expandedSql = relToTrinoConverter.convert(relNode);
    assertEquals(expandedSql, expectedSql);
}
Also used : RelNode(org.apache.calcite.rel.RelNode) RelToTrinoConverter(com.linkedin.coral.trino.rel2trino.RelToTrinoConverter) Test(org.testng.annotations.Test) AfterTest(org.testng.annotations.AfterTest)

Aggregations

RelToTrinoConverter (com.linkedin.coral.trino.rel2trino.RelToTrinoConverter)1 RelNode (org.apache.calcite.rel.RelNode)1 AfterTest (org.testng.annotations.AfterTest)1 Test (org.testng.annotations.Test)1