sorry for the html escape characters, we tried the following and it does not work
Class.forName("org.apache.calcite.jdbc.Driver"); Properties info = new Properties(); info.setProperty("lex", "JAVA"); info.setProperty(InternalProperty.CASE_SENSITIVE.name(), "false"); info.setProperty("defaultSchema", "hr"); Connection connection = DriverManager.getConnection("jdbc:calcite:", info); CalciteConnection conn = connection.unwrap(CalciteConnection.class); SchemaPlus rootSchema = conn.getRootSchema(); Schema schema = new ReflectiveSchema(target); rootSchema.add(schemaName, schema); return conn; ------------------ Original ------------------ From: "xiaobo ";<guxiaobo1...@qq.com.INVALID>; Send time: Friday, Feb 11, 2022 11:20 PM To: "dev"<dev@calcite.apache.org>; Subject: can we set a default schema for calcite connection to avoid writing schema names in sql we have tried the following and it does not work Class.forName("org.apache.calcite.jdbc.Driver"); Properties info = new Properties(); info.setProperty("lex", "JAVA"); info.setProperty(CalciteConnectionProperty.CASE_SENSITIVE.camelName(), "false"); info.setProperty("defaultSchema", "hr"); try { Connection connection = DriverManager.getConnection("jdbc:calcite:", info); CalciteConnection conn = connection.unwrap(CalciteConnection.class); SchemaPlus rootSchema = conn.getRootSchema();