junmuz commented on code in PR #11017:
URL: https://github.com/apache/paimon/pull/11017#discussion_r4585234922


##########
paimon-python/pypaimon/table/delete_ordering_guards.py:
##########
@@ -0,0 +1,45 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""Reject guarded histories in unsupported clients."""
+
+_UNSET = object()
+_ENABLED = 'delete-ordering-guards.enabled'
+_PREFIX = 'delete-ordering-guards.'
+_ERROR = (
+    'PyPaimon does not support delete ordering guards. '
+    'Use a guard-aware Java client to read or write this table; '
+    'disabling capture does not remove retained guard history.'
+)
+
+
+def validate_delete_ordering_guards(table, snapshot=_UNSET):
+    if not table.is_primary_key_table:
+        return
+    options = table.options.options.to_map()
+    validate_delete_ordering_guard_history(options, None)
+    if snapshot is _UNSET:
+        snapshot = table.snapshot_manager().get_latest_snapshot()

Review Comment:
   Fixed in 4aeaec0. The built-in JDBC catalog now loads snapshot metadata 
through FileIO without constructing its unsupported catalog snapshot loader, 
avoiding the Python JDBC connection before Native planner selection. REST and 
custom JDBC loaders retain their behavior, and guarded histories remain 
rejected. All 83 focused Python tests pass; all four reported JDBC setups also 
reach Native backend selection without a catalog reload.



-- 
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]

Reply via email to