caicancai commented on code in PR #3996:
URL: https://github.com/apache/calcite/pull/3996#discussion_r1815167506


##########
site/_docs/index.md:
##########
@@ -39,8 +39,17 @@ point it at some data.
 
 {% highlight java %}
 public static class HrSchema {
-  public final Employee[] emps = 0;
-  public final Department[] depts = 0;
+public final Employee[] emps = {

Review Comment:
   ```
   public class Main {
     public static class HrSchema {
       public final Employee[] emps = new Employee[0];
       public final Department[] depts = new Department[0];
     }
   
     public static void main(String[] args) {
       try {
         Class.forName("org.apache.calcite.jdbc.Driver");
         Properties info = new Properties();
         info.setProperty("lex", "JAVA");
         Connection connection = DriverManager.getConnection("jdbc:calcite:", 
info);
         CalciteConnection calciteConnection = 
connection.unwrap(CalciteConnection.class);
         SchemaPlus rootSchema = calciteConnection.getRootSchema();
         Schema schema = new ReflectiveSchema(new HrSchema());
         rootSchema.add("hr", schema);
         Statement statement = calciteConnection.createStatement();
         ResultSet resultSet = statement.executeQuery(
             "select d.deptno, min(e.empid)\n"
                 + "from hr.emps as e\n"
                 + "join hr.depts as d\n"
                 + "  on e.deptno = d.deptno\n"
                 + "group by d.deptno\n"
                 + "having count(*) > 1");
         print(resultSet);
         resultSet.close();
         statement.close();
         connection.close();
       } catch (Exception e) {
         e.printStackTrace();
       }
     }
   }
   ```
   @mihaibudiu Local testing looks fine



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to