Skip to content

Commit

Permalink
Add missing field to CreateTableAsSelect hashcode/equals
Browse files Browse the repository at this point in the history
  • Loading branch information
kokosing authored and martint committed Oct 28, 2015
1 parent 1bf2f54 commit 16bf58f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Expand Up @@ -500,7 +500,7 @@ protected TupleDescriptor visitCreateTableAsSelect(CreateTableAsSelect node, Ana
}
accessControl.checkCanCreateTable(session.getIdentity(), targetTable);

analysis.setCreateTableAsSelectWithData(node.getWithData());
analysis.setCreateTableAsSelectWithData(node.isWithData());

// analyze the query that creates the table
TupleDescriptor descriptor = process(node.getQuery(), context);
Expand Down
Expand Up @@ -52,7 +52,7 @@ public Map<String, Expression> getProperties()
return properties;
}

public boolean getWithData()
public boolean isWithData()
{
return withData;
}
Expand All @@ -66,7 +66,7 @@ public <R, C> R accept(AstVisitor<R, C> visitor, C context)
@Override
public int hashCode()
{
return Objects.hash(name, query, properties);
return Objects.hash(name, query, properties, withData);
}

@Override
Expand All @@ -81,7 +81,8 @@ public boolean equals(Object obj)
CreateTableAsSelect o = (CreateTableAsSelect) obj;
return Objects.equals(name, o.name)
&& Objects.equals(query, o.query)
&& Objects.equals(properties, o.properties);
&& Objects.equals(properties, o.properties)
&& Objects.equals(withData, o.withData);
}

@Override
Expand Down

0 comments on commit 16bf58f

Please sign in to comment.