Hi,
I am trying to understand the meaning of RexCorrelVariable

With this query I get a Plan like this:

Query: UPDATE tblspace1.tsql set n2=n2+n2,n3=n3+n2 WHERE k1=?

-- Best  Plan
EnumerableTableModify(table=[[tblspace1, tsql]], operation=[UPDATE],
updateColumnList=[[n2, n3]], sourceExpressionList=[[+($cor0.n2, $cor1.n2),
+($cor2.n3, $cor3.n2)]], flattened=[true]): rowcount = 1.0, cumulative cost
= {2.5 rows, 8.5 cpu, 0.0 io}, id = 157
  EnumerableProject(k1=[$0], n1=[$1], s1=[$2], t1=[$3], n2=[$4], n3=[$5],
EXPR$0=[+($4, $4)], EXPR$1=[+($5, $4)]): rowcount = 1.0, cumulative cost =
{1.5 rows, 8.5 cpu, 0.0 io}, id = 156
    EnumerableInterpreter: rowcount = 1.0, cumulative cost = {0.5 rows, 0.5
cpu, 0.0 io}, id = 155
      BindableTableScan(table=[[tblspace1, tsql]], filters=[[=($0, ?0)]]):
rowcount = 1.0, cumulative cost = {0.005 rows, 0.01 cpu, 0.0 io}, id = 148

here we have 4 RexCorrelVariable:

sourceExpressionList=[[+($cor0.n2, $cor1.n2), +($cor2.n3, $cor3.n2)]]

As far as I can understand RexCorrelVariable is like a reference to the
"current row"

Is it correct my understanding ?

Thank you

Enrico
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB