You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SNOW-3473261: Add Iceberg branch / tag time travel via version_ref
Add ``version_ref`` time-travel parameter that emits Snowflake's
``AT(VERSION_REF => '<name>')`` clause — the unified branch / tag
syntax that subsumes Spark Iceberg's ``VERSION AS OF '<x>'``
(branch + tag) and the 4-part ``branch_<x>`` / ``tag_<x>``
identifier forms.
Mirrors the merged ``version=`` (snapshot-id) PR (#4231):
* Hidden behind ``**kwargs`` on ``Session.table()``,
``DataFrameReader.table()``, and ``Table.__init__()`` — consumed
by Snowpark Connect, not part of the advertised public surface
yet.
* ``DataFrameReader`` reader option aliases ``version_ref`` and
``version-ref`` (matching the ``snapshot-id`` / ``snapshot_id``
style); both auto-set ``time_travel_mode='at'`` since branch /
tag reads are positional, not range-of-time.
* Validation: ``time_travel_mode='before'`` is rejected;
``version_ref`` is mutually exclusive with the other time-travel
parameters (``statement``, ``offset``, ``timestamp``, ``stream``,
``version``); non-string and empty refs are rejected.
* No AST proto changes — the field travels through ``**kwargs``
the same way ``version=`` does.
* No CHANGELOG entry — internal kwargs surface, not customer-
visible (matches PR #4231).
Unit tests cover SQL emission, validation, conflicts, and
``_extract_time_travel_from_options`` extraction for both alias
forms. Two integ tests under ``tests/integ/test_dataframe.py`` are
added but ``pytest.mark.skip``'d pending a CI account with a
CLD-linked unmanaged Iceberg table that has named branches / tags
and ``FEATURE_ICEBERG_TIME_TRAVEL`` enabled (manual reproducer
lives in the snowflake-eng/sas repo).
Co-authored-by: Cursor <cursoragent@cursor.com>
0 commit comments