public AssignmentSpecification(AST eq, Queryable persister) {
    if (eq.getType() != HqlSqlTokenTypes.EQ) {
      throw new QueryException("assignment in set-clause not associated with equals");
    }

    this.eq = eq;
    this.factory = persister.getFactory();

    // Needed to bump this up to DotNode, because that is the only thing which currently
    // knows about the property-ref path in the correct format; it is either this, or
    // recurse over the DotNodes constructing the property path just like DotNode does
    // internally
    final PathSeparatorNode lhs = (PathSeparatorNode) eq.getFirstChild();
    final SqlNode rhs = (SqlNode) lhs.getNextSibling();

    validateLhs(lhs);

    final String propertyPath = lhs.getPropertyPath();
    Set<String> temp = new HashSet<String>();
    // yuck!
    if (persister instanceof UnionSubclassEntityPersister) {
      final String[] tables = persister.getConstraintOrderedTableNameClosure();
      Collections.addAll(temp, tables);
    } else {
      temp.add(
          persister.getSubclassTableName(persister.getSubclassPropertyTableNumber(propertyPath)));
    }
    this.tableNames = Collections.unmodifiableSet(temp);

    if (rhs == null) {
      hqlParameters = new ParameterSpecification[0];
    } else if (isParam(rhs)) {
      hqlParameters =
          new ParameterSpecification[] {((ParameterNode) rhs).getHqlParameterSpecification()};
    } else {
      List parameterList =
          ASTUtil.collectChildren(
              rhs,
              new ASTUtil.IncludePredicate() {
                public boolean include(AST node) {
                  return isParam(node);
                }
              });
      hqlParameters = new ParameterSpecification[parameterList.size()];
      Iterator itr = parameterList.iterator();
      int i = 0;
      while (itr.hasNext()) {
        hqlParameters[i++] = ((ParameterNode) itr.next()).getHqlParameterSpecification();
      }
    }
  }