rdblue commented on code in PR #16961:
URL: https://github.com/apache/iceberg/pull/16961#discussion_r4128063665


##########
format/index-spec.md:
##########
@@ -0,0 +1,731 @@
+---
+title: "Index Spec"
+---
+<!--
+ - 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.
+ -->
+# Iceberg Index Specification
+
+## Background and Motivation
+
+An index is most valuable when it is a property of the table rather than of 
the engine that built it. This
+specification defines a common format for index metadata and a common storage 
architecture for index data, so that any
+engine can build an index, maintain it, and use it to plan queries against the 
table.
+
+## Goals
+
+* **Portability** -- An index written by one engine will be readable by any 
other engine.
+* **Separation** -- Index metadata will be committed separately from table 
metadata. Building and maintaining an index
+  will not rewrite the table.
+* **Optionality** -- Indexes will be optional. Engines may ignore an index 
they do not support.
+* **Consistency** -- Each index snapshot will index exactly the live rows of 
one source table snapshot.
+
+## Overview
+
+An index is recorded in an index metadata file that contains the index 
definition and a set of index snapshots. Each
+index snapshot corresponds to a snapshot of the source table and references 
the index data for that state.
+
+Index metadata files and index data files are immutable. Every update writes a 
new metadata file. An update that adds an

Review Comment:
   We generally try to avoid saying what an "update" does and instead talk 
about valid states and invariants, and then how to interpret those valid 
states. I think what this is trying to say is pretty much what the table spec 
says about committing:
   
   > Table state is maintained in metadata files. All changes to table state 
create a new metadata file and replace the old metadata with an atomic swap. 
The table metadata file tracks the table schema, partitioning config, custom 
properties, and snapshots of the table contents. A snapshot represents the 
state of a table at some time and is used to access the complete set of data 
files in the table.
   
   I think where this differs is that we want to outline the high-level things 
that are tracked by index metadata rather than table metadata, we want to 
outline what an index state is, and most importantly, the relationship between 
an index state and a table snapshot (which is I think the paragraph above).



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

Reply via email to