code: func (p *PhysicalApply) ResolveIndices() (err error) {
  	err = p.physicalSchemaProducer.ResolveIndices()
  	if err != nil {
  		return err
  	}
  	err = p.PhysicalJoin.ResolveIndices()
  	if err != nil {
  		return err
  	}
  	for i, col := range p.schema.Columns {
  		newCol, err := col.ResolveIndices(p.PhysicalJoin.schema)
  		if err != nil {
  			return err
  		}
  		p.schema.Columns[i] = newCol.(*expression.Column)
  	}
  	for _, col := range p.OuterSchema {
  		newCol, err := col.Column.ResolveIndices(p.children[0].Schema())
  		if err != nil {
  			return err
  		}
  		col.Column = *newCol.(*expression.Column)
  	}
  	joinedSchema := expression.MergeSchema(p.children[0].Schema(), p.children[1].Schema())
  	for i, cond := range p.PhysicalJoin.EqualConditions {
  		newSf, err := cond.ResolveIndices(joinedSchema)
  		if err != nil {
  			return err
  		}
  		p.PhysicalJoin.EqualConditions[i] = newSf.(*expression.ScalarFunction)
  	}
  	return
  }
docs: // ResolveIndices implements Plan interface.