Hello all,
I'm fairly new to calcite and would like some assistance.
I'm building a `RelBuilder` instance using `FrameworkConfig` like so:
`import javax.sql.DataSource;
import org.apache.calcite.*;
DataSource ds = JdbcSchema.dataSource("jdbc:hive2://ip:port/db",
"org.apache.hive.jdbc.HiveDriver", "user", "pwd");
SchemaPlus rootSchema = Frameworks.createRootSchema(true);
JdbcSchema jdbcSchema = JdbcSchema.create(rootSchema, "Connection", ds,
SqlDialectFactoryImpl.INSTANCE, null, null);
for (String tableName : jdbcSchema.getTableNames()) {
Table t = jdbcSchema.getTable(tableName);
rootSchema.add(tableName, t);
}
FrameworkConfig config =
Frameworks.newConfigBuilder().defaultSchema(rootSchema).build();
RelBuilder builder = RelBuilder.create(config);`
Now while building `config`, before adding `Table t` to the `rootSchema` I
would like to alter the columns of `t` (for instance, change the column
names to uppercase).
May I know how should I go about to achieve this?
--
Thanks & Regards,
Rakesh.