# 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.

# Exact pins for lance_build_preinstalled_catalog.py.
#
# The fixture has several readers and they do not all run the same Lance version:
#
#   lance-c v0.1.6 (lance-rs 7.0.0-beta.7)  BE, both from source and from the prebuilt
#                                           doris-thirdparty package - thirdparty/vars.sh
#   lance-java 4.0.0                        Spark, via lance-spark-bundle 0.4.0; it
#                                           registers runtime tables into the same __manifest
#   lance-java 9.1.0-beta.3                 Doris FE Directory Namespace client - fe/pom.xml
#
# The writer is pinned to the Lance generation the BE actually reads. It used to be pinned
# to the oldest reader instead, on the theory that an older writer is readable by every
# reader above; that stopped being possible once the fixture had to carry non-Float32
# indexes. Measured on pylance 4.0.1 (Lance 4): IVF_HNSW_FLAT + float64 and
# IVF_HNSW_FLAT + uint8/hamming panic during index creation, and IVF_FLAT + float64 builds
# but every search against it fails with "Task was aborted". All of those work on Lance 7.
#
# So Spark/lance-java 4.0.0 compatibility with this fixture is no longer something the pin
# guarantees; it is something the regression run verifies. external_table_p0/lance covers
# it: the Spark and REST catalog suites read and register into the same __manifest this
# writer produces, and they must pass for a fixture rebuild to be acceptable.
#
# The pylance and lance-namespace pins are enforced rather than advisory:
# check_pinned_writer() refuses to build or verify the fixture unless the installed versions
# match them exactly. That check has to exist because the generator's own self-check cannot
# catch a wrong writer - it reads the fixture back with the very Lance that produced it, so
# it would pass by construction while emitting something the BE's lance-c or Spark's
# lance-java cannot open. Those two decide what lands on disk: pylance writes the data and
# index files, lance-namespace writes the __manifest and picks the hash-prefixed directory
# names.
#
# pyarrow is pinned for reproducibility but deliberately NOT asserted. It only supplies the
# in-memory Arrow buffers handed to Lance, and whether it changed a stored value is checked
# directly - check_data_shapes pins a digest of every vector, and check_vector_dataset reads
# rows back and compares them through the element type. Verifying the bytes beats pinning a
# proxy for them.
pylance==7.0.0
lance-namespace==0.7.7
pyarrow==25.0.0
