private static List<? extends Tuple> toList(Object[][] table) {
        List<Tuple> list = new ArrayList<>(table.length);
        for (Object[] aTable : table) {
            List<Value> row = new ArrayList<>(aTable.length);
            for (Object val : aTable) {
                if (val instanceof DataType) {
                    row.add(Value.nullOf((DataType) val));
                } else if (val instanceof Float || val instanceof Double) {
                    row.add(Value.of(((Number) val).doubleValue()));
                } else if (val instanceof Integer || val instanceof Long) {
                    row.add(Value.of(((Number) val).longValue()));
                } else if (val instanceof String) {
                    row.add(Value.of(val.toString()));
                } else {
                    throw new IllegalArgumentException("Unsupported value type: " + val.getClass());
                }
            }
            list.add(new SimpleListTuple(row));
        }
        return list;
    }