diff options
author | Tathagata Das <tathagata.das1565@gmail.com> | 2015-12-09 20:47:15 -0800 |
---|---|---|
committer | Shixiong Zhu <shixiong@databricks.com> | 2015-12-09 20:47:15 -0800 |
commit | bd2cd4f53d1ca10f4896bd39b0e180d4929867a2 (patch) | |
tree | 308b2c7239d67191f95bd5673ab98f916b40bd58 /sql/catalyst | |
parent | 2166c2a75083c2262e071a652dd52b1a33348b6e (diff) | |
download | spark-bd2cd4f53d1ca10f4896bd39b0e180d4929867a2.tar.gz spark-bd2cd4f53d1ca10f4896bd39b0e180d4929867a2.tar.bz2 spark-bd2cd4f53d1ca10f4896bd39b0e180d4929867a2.zip |
[SPARK-12244][SPARK-12245][STREAMING] Rename trackStateByKey to mapWithState and change tracking function signature
SPARK-12244:
Based on feedback from early users and personal experience attempting to explain it, the name trackStateByKey had two problem.
"trackState" is a completely new term which really does not give any intuition on what the operation is
the resultant data stream of objects returned by the function is called in docs as the "emitted" data for the lack of a better.
"mapWithState" makes sense because the API is like a mapping function like (Key, Value) => T with State as an additional parameter. The resultant data stream is "mapped data". So both problems are solved.
SPARK-12245:
From initial experiences, not having the key in the function makes it hard to return mapped stuff, as the whole information of the records is not there. Basically the user is restricted to doing something like mapValue() instead of map(). So adding the key as a parameter.
Author: Tathagata Das <tathagata.das1565@gmail.com>
Closes #10224 from tdas/rename.
Diffstat (limited to 'sql/catalyst')
0 files changed, 0 insertions, 0 deletions