suhuruli commented on code in PR #60462:
URL: https://github.com/apache/spark/pull/60462#discussion_r4637205279
##########
python/pyspark/pipelines/api.py:
##########
@@ -152,7 +152,9 @@ def table(
These confs will be set when the query for the dataset is executed and
they can override \
confs set for the pipeline or on the cluster.
:param table_properties: A dict where the keys are the property names and
the values are the \
- property values. These properties will be set on the table.
+ property values. These properties will be set on the table. A property
removed from \
Review Comment:
Agreed that "on a later run" was vague, so I reworded it. The sentence now
names the condition for removal: a property that an earlier run of this dataset
declared and that is missing from the dict is removed when the dataset is next
materialized, and properties the definition never declared are left in place. I
did not take the suggested wording as is, because removing every property that
is not in the dict would also cover catalog-managed properties and ones set
with `ALTER TABLE`, and those are not removed. The wording is changed in all
four docstrings, three in `api.py` and one in `output.py`.
##########
python/pyspark/pipelines/api.py:
##########
@@ -152,7 +152,9 @@ def table(
These confs will be set when the query for the dataset is executed and
they can override \
confs set for the pipeline or on the cluster.
:param table_properties: A dict where the keys are the property names and
the values are the \
- property values. These properties will be set on the table.
+ property values. These properties will be set on the table. A property
removed from \
Review Comment:
Done. The same change applies to the other two copies in `api.py`
(`materialized_view` and `create_streaming_table`) and to the one on `Table` in
`output.py`. All four now read the same.
##########
sql/pipelines/src/main/scala/org/apache/spark/sql/pipelines/graph/AutoCdcAuxiliaryTable.scala:
##########
@@ -71,27 +66,22 @@ object AutoCdcAuxiliaryTable {
s"${PipelinesTableProperties.pipelinesPrefix}autocdc.trackHistoryColumnNames"
/**
- * A JSON string-array codec for column-name lists persisted as
auxiliary-table properties (used
- * for both [[keyColumnNamesProperty]] and
[[trackHistoryColumnNamesProperty]]). Round-trips an
- * empty list as `[]` -- both an empty key set and an empty track-history
set are meaningful to
- * some caller, so no non-empty invariant is assumed here.
+ * Serializes a column-name list persisted as an auxiliary-table property
(used for both
+ * [[keyColumnNamesProperty]] and [[trackHistoryColumnNamesProperty]]) with
+ * [[JsonStringArrayCodec]]. Round-trips an empty list as `[]` -- both an
empty key set and an
+ * empty track-history set are meaningful to some caller, so no non-empty
invariant is assumed
+ * here.
*/
private[graph] def serializeColumnNames(names: Seq[String]): String = {
- compact(JArray(names.map(JString(_)).toList))
Review Comment:
It is related. The Scaladoc changed because the column-name codec moved into
`JsonStringArrayCodec`, which the declared-keys record and the AutoCDC column
lists now share instead of each having its own copy. `serializeColumnNames` and
its parsing counterpart delegate to it. Serialization is unchanged. Parsing is
stricter in one case: a value with content after the array, such as `["a"]x`,
is now malformed and raises
`AUTOCDC_INVALID_STATE.AUXILIARY_TABLE_PROPERTY_MALFORMED`, where the old
parser read the leading array. The pipeline never writes such a value.
`JsonStringArrayCodecSuite` covers the malformed inputs and
`AutoCdcAuxiliaryTableSuite` runs the same round trips as before.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]