asolimando commented on code in PR #3111:
URL: https://github.com/apache/calcite/pull/3111#discussion_r1138504311


##########
testkit/src/main/java/org/apache/calcite/test/catalog/MockCatalogReaderSimple.java:
##########
@@ -136,8 +116,9 @@ protected MockCatalogReaderSimple(RelDataTypeFactory 
typeFactory,
     empDefaultsTable.addColumn("DEPTNO", fixture.intTypeNull);
     empDefaultsTable.addColumn("SLACKER", fixture.booleanTypeNull);
     registerTable(empDefaultsTable);
+  }
 
-    // Register "EMP_B" table. As "EMP", birth with a "BIRTHDATE" column.
+  private void registerTableEmpB(MockSchema salesSchema, Fixture fixture) {

Review Comment:
   Maybe renaming it to `registerTableEmpWithBirthday`? We have more space than 
in a table alias, it's better to be more explicit, especially because we are 
losing the comment after the refactoring.



##########
testkit/src/main/java/org/apache/calcite/test/catalog/MockCatalogReaderSimple.java:
##########
@@ -260,47 +250,48 @@ protected MockCatalogReaderSimple(RelDataTypeFactory 
typeFactory,
     shipmentsStream.addColumn("ROWTIME", fixture.timestampType);
     shipmentsStream.addMonotonic("ROWTIME");
     registerTable(shipmentsStream);
+  }
 
-    // Register "PRODUCTS" table.
+  private void registerTableProducts(MockSchema salesSchema, Fixture fixture) {
     MockTable productsTable =
         MockTable.create(this, salesSchema, "PRODUCTS", false, 200D);
     productsTable.addColumn("PRODUCTID", fixture.intType);
     productsTable.addColumn("NAME", fixture.varchar20Type);
     productsTable.addColumn("SUPPLIERID", fixture.intType);
     registerTable(productsTable);
+  }
 
-    // Register "EMPTY_PRODUCTS" table.
+  private void registerTableEmptyProducts(MockSchema salesSchema, Fixture 
fixture) {
     MockTable emptyProductsTable =
         MockTable.create(this, salesSchema, "EMPTY_PRODUCTS", false, 0D, 0D);
     emptyProductsTable.addColumn("PRODUCTID", fixture.intType);
     emptyProductsTable.addColumn("NAME", fixture.varchar20Type);
     emptyProductsTable.addColumn("SUPPLIERID", fixture.intType);
     registerTable(emptyProductsTable);
+  }
 
-    // Register "PRODUCTS_TEMPORAL" table.
+  private void registerTableProductsTemporal(MockSchema salesSchema, Fixture 
fixture) {
     MockTable productsTemporalTable =
         MockTable.create(this, salesSchema, "PRODUCTS_TEMPORAL", false, 200D,
-        null, NullInitializerExpressionFactory.INSTANCE, true);
+            null, NullInitializerExpressionFactory.INSTANCE, true);
     productsTemporalTable.addColumn("PRODUCTID", fixture.intType);
     productsTemporalTable.addColumn("NAME", fixture.varchar20Type);
     productsTemporalTable.addColumn("SUPPLIERID", fixture.intType);
     productsTemporalTable.addColumn("SYS_START", fixture.timestampType);
     productsTemporalTable.addColumn("SYS_END", fixture.timestampType);
     registerTable(productsTemporalTable);
+  }
 
-    // Register "SUPPLIERS" table.
+  private void registerTableSuppliers(MockSchema salesSchema, Fixture fixture) 
{
     MockTable suppliersTable =
         MockTable.create(this, salesSchema, "SUPPLIERS", false, 10D);
     suppliersTable.addColumn("SUPPLIERID", fixture.intType);
     suppliersTable.addColumn("NAME", fixture.varchar20Type);
     suppliersTable.addColumn("CITY", fixture.intType);
     registerTable(suppliersTable);
+  }
 
-    // Register "EMP_20" and "EMPNULLABLES_20 views.
-    // Same columns as "EMP" amd "EMPNULLABLES", but "DEPTNO" not visible and 
set to 20 by default
-    // and "SAL" is visible but must be greater than 1000, which is the 
equivalent of:
-    //   SELECT EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, SLACKER
-    //   FROM EMP WHERE DEPTNO = 20 AND SAL > 1000
+  private void registerViewEmp20(MockSchema salesSchema, MockTable empTable, 
Fixture fixture) {

Review Comment:
   We are losing a lot of information by removing the comment, I suggest to 
keep it, WDYT?



-- 
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