1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| import com.google.common.collect.ImmutableList; import org.apache.calcite.schema.QueryableTable; import org.apache.calcite.schema.TranslatableTable;
import java.util.Arrays; import java.util.Collections;
public class HrSchema { @Override public String toString() { return "HrSchema"; }
public final Employees[] emps = { new Employees(100, 10, "Bill", 10000, 1000), new Employees(200, 20, "Eric", 8000, 500), new Employees(150, 10, "Sebastian", 7000, null), new Employees(110, 10, "Theodore", 11500, 250), }; public final Departments[] depts = { new Departments(10, "Sales", Arrays.asList(emps[0], emps[2]), new Location(-122, 38)), new Departments(30, "Marketing", ImmutableList.of(), new Location(0, 52)), new Departments(40, "HR", Collections.singletonList(emps[1]), null), }; public final Dependents[] Dependentss = { new Dependents(10, "Michael"), new Dependents(10, "Jane"), }; public final Dependents[] locations = { new Dependents(10, "San Francisco"), new Dependents(20, "San Diego"), };
public QueryableTable foo(int count) { return Smalls.generateStrings(count); }
public TranslatableTable view(String s) { return Smalls.view(s); } }
|