Github user kaspersorensen commented on a diff in the pull request:

    https://github.com/apache/metamodel/pull/20#discussion_r29602798
  
    --- Diff: core/src/test/java/org/apache/metamodel/query/FromItemTest.java 
---
    @@ -98,4 +105,35 @@ public void testSubQueryJoinToString() throws Exception 
{
                                "MetaModelSchema.project a LEFT JOIN (SELECT 
c.contributor_id, c.project_id AS foobar, c.name FROM MetaModelSchema.role c) b 
ON a.project_id = b.foobar",
                                from.toString());
        }
    +   
    +    public void testCompoundJoin() {
    +        final Schema schema = getExampleSchema();
    +   
    +        final QueryPostprocessDataContext dc = new 
QueryPostprocessDataContext() {
    +            @Override
    +            protected DataSet materializeMainSchemaTable(Table table, 
Column[] columns, int maxRows) {
    +                Object[] values = new Object[columns.length];
    +                for (int i = 0; i < columns.length; i++) {
    +                    values[i] = columns[i].getColumnNumber();
    +                }
    +                DataSetHeader header = new SimpleDataSetHeader(columns);
    +                DefaultRow row = new DefaultRow(header, values);
    +                return new InMemoryDataSet(row);
    +            }
    +
    +            @Override
    +            protected String getMainSchemaName() throws MetaModelException 
{
    +                return "MetaModelSchema";
    +            }
    +
    +            @Override
    +            protected Schema getMainSchema() throws MetaModelException {
    +                return schema;
    +            }
    +        };
    + 
    +        Query query = dc.parseQuery("SELECT c.contributor_id,p.project_id 
from contributor c INNER JOIN role r ON c.contributor_id=r.contributor_id INNER 
JOIN project p ON p.project_id=r.project_id");
    +        System.out.println(query);
    --- End diff --
    
    Probably a left-over from a debugging session or so, but let's not print to 
syso.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to