Class SubstraitSqlUtils
- java.lang.Object
-
- com.amazonaws.athena.connector.substrait.SubstraitSqlUtils
-
public final class SubstraitSqlUtils extends Object
Utility class for converting Substrait plans to SQL and extracting schema information.Provides methods to: - Convert Substrait plans (serialized as base64 strings) to Calcite SqlNode representations - Extract Arrow Schema from Substrait plans - Convert between Calcite RelDataType and Apache Arrow types
This class uses Apache Calcite as an intermediate representation to bridge Substrait plans and SQL dialects, enabling connectors to work with query pushdown capabilities.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.calcite.sql.SqlNodegetSqlNodeFromSubstraitPlan(String planString, org.apache.calcite.sql.SqlDialect sqlDialect)static org.apache.arrow.vector.types.pojo.SchemagetTableSchemaFromSubstraitPlan(String planString, org.apache.calcite.sql.SqlDialect sqlDialect)
-
-
-
Method Detail
-
getSqlNodeFromSubstraitPlan
public static org.apache.calcite.sql.SqlNode getSqlNodeFromSubstraitPlan(String planString, org.apache.calcite.sql.SqlDialect sqlDialect)
-
getTableSchemaFromSubstraitPlan
public static org.apache.arrow.vector.types.pojo.Schema getTableSchemaFromSubstraitPlan(String planString, org.apache.calcite.sql.SqlDialect sqlDialect)
-
-