This is an automated email from the ASF dual-hosted git repository.
laskoviymishka pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-go.git
The following commit(s) were added to refs/heads/main by this push:
new 88bce2dd2 refactor!: fix the remaining initialisms in exported names
(#2648)
88bce2dd2 is described below
commit 88bce2dd294ab4d83eac188879600df51c04ebe0
Author: Andrei Tserakhau <[email protected]>
AuthorDate: Fri Nov 20 20:08:37 2026 +0100
refactor!: fix the remaining initialisms in exported names (#2648)
Rename the last exported identifiers that break Go initialism style,
following #2307 and #2310:
table.PropertyUuid -> table.PropertyUUID
table.PropertyCurrentSnapshotId -> table.PropertyCurrentSnapshotID
table.ReassignedIds -> table.ReassignedIDs
table.WriteTask.Uuid -> table.WriteTask.UUID
glue.CatalogIdKey -> glue.CatalogIDKey
io.ADLSSasTokenPrefix -> io.ADLSSASTokenPrefix
rest.Oauth2AuthManager -> rest.OAuth2AuthManager
rest.NewOauth2AuthManager -> rest.NewOAuth2AuthManager
The OAuth2 names now match AuthTypeOAuth2 and WithOAuthToken. Callers,
tests, doc comments, the nil-source panic message and the website docs
are updated. Property strings, config keys, JSON and unexported names
are unchanged, and no deprecated aliases are kept.
Signed-off-by: laskoviymishka <[email protected]>
---
catalog/glue/glue.go | 4 ++--
catalog/glue/glue_test.go | 2 +-
catalog/rest/auth.go | 24 +++++++++++-----------
catalog/rest/auth_test.go | 22 ++++++++++----------
catalog/rest/auth_token_source_test.go | 8 ++++----
catalog/rest/googleauth/googleauth.go | 4 ++--
catalog/rest/refresh_table_credentials_test.go | 16 +++++++--------
catalog/rest/rest.go | 8 ++++----
catalog/rest/vended_creds_test.go | 26 ++++++++++++------------
internal/adlsauth/adlsauth.go | 2 +-
io/config.go | 2 +-
io/gocloud/azure/azure.go | 2 +-
io/gocloud/azure/token_test.go | 10 ++++-----
table/delete_parquet_settings_test.go | 4 ++--
table/delete_record_writer.go | 2 +-
table/geo_write_test.go | 10 ++++-----
table/metadata.go | 6 +++---
table/metadata_builder_internal_test.go | 8 ++++----
table/parquet_bloom_properties_test.go | 2 +-
table/parquet_column_stats_test.go | 4 ++--
table/properties.go | 8 ++++----
table/rewrite_position_delete_files.go | 2 +-
table/writer.go | 4 ++--
table/writer_invariants_bench_test.go | 2 +-
table/writer_schema_projection_test.go | 2 +-
table/writer_test.go | 28 +++++++++++++-------------
website/src/configuration.md | 10 ++++-----
website/src/releases.md | 1 +
28 files changed, 112 insertions(+), 111 deletions(-)
diff --git a/catalog/glue/glue.go b/catalog/glue/glue.go
index 3b8b55fd6..be9129c60 100644
--- a/catalog/glue/glue.go
+++ b/catalog/glue/glue.go
@@ -71,7 +71,7 @@ const (
// The ID of the Glue Data Catalog where the tables reside. If none is
provided, Glue
// automatically uses the caller's AWS account ID by default.
// See:
https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-catalog-databases.html
- CatalogIdKey = "glue.id"
+ CatalogIDKey = "glue.id"
// Skip archiving old table versions on commits. Recommended for
high-frequency
// streaming workloads to avoid hitting Glue's archive limits.
@@ -196,7 +196,7 @@ func NewCatalog(opts ...Option) (*Catalog, error) {
}
var catalogId *string
- if val, ok := glueOps.awsProperties[CatalogIdKey]; ok {
+ if val, ok := glueOps.awsProperties[CatalogIDKey]; ok {
catalogId = &val
} else {
catalogId = nil
diff --git a/catalog/glue/glue_test.go b/catalog/glue/glue_test.go
index e33d19ad6..1d7859cfc 100644
--- a/catalog/glue/glue_test.go
+++ b/catalog/glue/glue_test.go
@@ -2983,7 +2983,7 @@ func TestGlueCreateTableS3TablesFederatedIntegration(t
*testing.T) {
ctx := context.Background()
awsCfg, err := config.LoadDefaultConfig(ctx)
assert.NoError(err)
- ctlg, err := NewCatalog(WithAWSConfig(awsCfg),
WithAWSProperties(AWSProperties{CatalogIdKey: catalogID}))
+ ctlg, err := NewCatalog(WithAWSConfig(awsCfg),
WithAWSProperties(AWSProperties{CatalogIDKey: catalogID}))
assert.NoError(err)
tableName := fmt.Sprintf("it_%d", time.Now().UnixNano())
diff --git a/catalog/rest/auth.go b/catalog/rest/auth.go
index 0b50b6c88..e70e2c20c 100644
--- a/catalog/rest/auth.go
+++ b/catalog/rest/auth.go
@@ -45,19 +45,19 @@ type ContextAuthManager interface {
AuthHeaderWithContext(ctx context.Context) (string, string, error)
}
-// Oauth2AuthManager is an implementation of the AuthManager interface which
+// OAuth2AuthManager is an implementation of the AuthManager interface which
// uses an oauth2.TokenSource to provide bearer tokens. The token source
// handles caching, thread-safe refresh, and expiry management.
-type Oauth2AuthManager struct {
+type OAuth2AuthManager struct {
tokenSource oauth2.TokenSource
// refresh shares one in-flight Token call, so a caller that stops
waiting
// leaves nothing queued behind it.
refresh singleflight.Group
}
-var _ ContextAuthManager = (*Oauth2AuthManager)(nil)
+var _ ContextAuthManager = (*OAuth2AuthManager)(nil)
-// NewOauth2AuthManager returns an AuthManager that sends tokens from ts, for
+// NewOAuth2AuthManager returns an AuthManager that sends tokens from ts, for
// identity providers the built-in client-credentials flow can't reach, such as
// Google Application Default Credentials for BigLake. Pass the result to
// WithAuthManager.
@@ -74,17 +74,17 @@ var _ ContextAuthManager = (*Oauth2AuthManager)(nil)
// http.DefaultClient, which has no timeout. AuthHeaderWithContext still
// returns when its context is done.
//
-// NewOauth2AuthManager panics if ts is nil.
-func NewOauth2AuthManager(ts oauth2.TokenSource) *Oauth2AuthManager {
+// NewOAuth2AuthManager panics if ts is nil.
+func NewOAuth2AuthManager(ts oauth2.TokenSource) *OAuth2AuthManager {
if ts == nil {
- panic("rest: NewOauth2AuthManager called with a nil
oauth2.TokenSource")
+ panic("rest: NewOAuth2AuthManager called with a nil
oauth2.TokenSource")
}
- return &Oauth2AuthManager{tokenSource: oauth2.ReuseTokenSource(nil, ts)}
+ return &OAuth2AuthManager{tokenSource: oauth2.ReuseTokenSource(nil, ts)}
}
// AuthHeader returns the authorization header with the bearer token.
-func (o *Oauth2AuthManager) AuthHeader() (string, string, error) {
+func (o *OAuth2AuthManager) AuthHeader() (string, string, error) {
tok, err, _ := o.refresh.Do("token", o.fetchToken)
return o.authHeader(tok, err)
@@ -95,7 +95,7 @@ func (o *Oauth2AuthManager) AuthHeader() (string, string,
error) {
// is required, the caller waits for it only until ctx is done; the refresh
// itself keeps running, bounded by the token-refresh client's Timeout, and its
// result serves later callers.
-func (o *Oauth2AuthManager) AuthHeaderWithContext(ctx context.Context)
(string, string, error) {
+func (o *OAuth2AuthManager) AuthHeaderWithContext(ctx context.Context)
(string, string, error) {
if err := ctx.Err(); err != nil {
return "", "", err
}
@@ -109,11 +109,11 @@ func (o *Oauth2AuthManager) AuthHeaderWithContext(ctx
context.Context) (string,
}
// fetchToken adapts the token source to singleflight's untyped callback.
-func (o *Oauth2AuthManager) fetchToken() (any, error) {
+func (o *OAuth2AuthManager) fetchToken() (any, error) {
return o.tokenSource.Token()
}
-func (o *Oauth2AuthManager) authHeader(tok any, err error) (string, string,
error) {
+func (o *OAuth2AuthManager) authHeader(tok any, err error) (string, string,
error) {
if err != nil {
if re, ok := errors.AsType[*oauth2.RetrieveError](err); ok {
return "", "", oauthError{
diff --git a/catalog/rest/auth_test.go b/catalog/rest/auth_test.go
index 543db6170..59c76cb2f 100644
--- a/catalog/rest/auth_test.go
+++ b/catalog/rest/auth_test.go
@@ -35,7 +35,7 @@ import (
)
func TestOauth2AuthManager_AuthHeader_StaticToken(t *testing.T) {
- manager := &Oauth2AuthManager{
+ manager := &OAuth2AuthManager{
tokenSource: oauth2.StaticTokenSource(&oauth2.Token{
AccessToken: "static_token",
TokenType: "Bearer",
@@ -78,7 +78,7 @@ func TestOauth2AuthManager_AuthHeader_FetchToken_Success(t
*testing.T) {
}
ctx := context.WithValue(context.Background(), oauth2.HTTPClient,
server.Client())
- manager := &Oauth2AuthManager{
+ manager := &OAuth2AuthManager{
tokenSource: cfg.TokenSource(ctx),
}
@@ -110,7 +110,7 @@ func
TestOauth2AuthManager_AuthHeader_FetchToken_ErrorResponse(t *testing.T) {
}
ctx := context.WithValue(context.Background(), oauth2.HTTPClient,
server.Client())
- manager := &Oauth2AuthManager{
+ manager := &OAuth2AuthManager{
tokenSource: cfg.TokenSource(ctx),
}
@@ -142,7 +142,7 @@ func
TestOauth2AuthManager_AuthHeaderWithContext_CallerDeadline(t *testing.T) {
}
tokenCtx := context.WithValue(context.Background(), oauth2.HTTPClient,
server.Client())
- manager := &Oauth2AuthManager{
+ manager := &OAuth2AuthManager{
tokenSource: cfg.TokenSource(tokenCtx),
}
@@ -168,7 +168,7 @@ func (s *blockingTokenSource) Token() (*oauth2.Token,
error) {
func TestOauth2AuthManager_AuthHeaderWithContext_SharesRefresh(t *testing.T) {
source := &blockingTokenSource{release: make(chan struct{})}
- manager := &Oauth2AuthManager{tokenSource: source}
+ manager := &OAuth2AuthManager{tokenSource: source}
// Concurrent callers give up before the refresh completes.
var callers sync.WaitGroup
@@ -213,7 +213,7 @@ func TestNewOauth2AuthManager_ReusesValidToken(t
*testing.T) {
source := &sequenceTokenSource{tokens: []*oauth2.Token{
{AccessToken: "a", Expiry: time.Now().Add(time.Hour)},
}}
- manager := NewOauth2AuthManager(source)
+ manager := NewOAuth2AuthManager(source)
for range 3 {
key, value, err := manager.AuthHeader()
@@ -229,7 +229,7 @@ func TestNewOauth2AuthManager_RefreshesExpiredToken(t
*testing.T) {
{AccessToken: "a", TokenType: "Bearer", Expiry:
time.Now().Add(-time.Minute)},
{AccessToken: "b", TokenType: "Bearer", Expiry:
time.Now().Add(time.Hour)},
}}
- manager := NewOauth2AuthManager(source)
+ manager := NewOAuth2AuthManager(source)
for _, want := range []string{"Bearer a", "Bearer b", "Bearer b"} {
_, value, err :=
manager.AuthHeaderWithContext(context.Background())
@@ -240,7 +240,7 @@ func TestNewOauth2AuthManager_RefreshesExpiredToken(t
*testing.T) {
}
func TestNewOauth2AuthManager_RetrieveErrorIsOAuthError(t *testing.T) {
- manager := NewOauth2AuthManager(&sequenceTokenSource{err:
&oauth2.RetrieveError{
+ manager := NewOAuth2AuthManager(&sequenceTokenSource{err:
&oauth2.RetrieveError{
ErrorCode: "invalid_grant",
ErrorDescription: "Token has been expired or revoked.",
}})
@@ -253,7 +253,7 @@ func TestNewOauth2AuthManager_RetrieveErrorIsOAuthError(t
*testing.T) {
func TestNewOauth2AuthManager_CanceledContextSkipsSource(t *testing.T) {
source := &sequenceTokenSource{tokens: []*oauth2.Token{{AccessToken:
"a"}}}
- manager := NewOauth2AuthManager(source)
+ manager := NewOAuth2AuthManager(source)
ctx, cancel := context.WithCancel(context.Background())
cancel()
@@ -264,7 +264,7 @@ func TestNewOauth2AuthManager_CanceledContextSkipsSource(t
*testing.T) {
}
func TestNewOauth2AuthManager_NilSourcePanics(t *testing.T) {
- assert.PanicsWithValue(t, "rest: NewOauth2AuthManager called with a nil
oauth2.TokenSource", func() {
- NewOauth2AuthManager(nil)
+ assert.PanicsWithValue(t, "rest: NewOAuth2AuthManager called with a nil
oauth2.TokenSource", func() {
+ NewOAuth2AuthManager(nil)
})
}
diff --git a/catalog/rest/auth_token_source_test.go
b/catalog/rest/auth_token_source_test.go
index a0ce87527..686518334 100644
--- a/catalog/rest/auth_token_source_test.go
+++ b/catalog/rest/auth_token_source_test.go
@@ -80,7 +80,7 @@ func TestNewOauth2AuthManagerAuthenticatesCatalogRequests(t
*testing.T) {
ctx := context.Background()
cat, err := rest.NewCatalog(ctx, "rest", srv.URL,
-
rest.WithAuthManager(rest.NewOauth2AuthManager(&rotatingTokenSource{})))
+
rest.WithAuthManager(rest.NewOAuth2AuthManager(&rotatingTokenSource{})))
require.NoError(t, err)
_, err = cat.ListNamespaces(ctx, nil)
require.NoError(t, err)
@@ -92,9 +92,9 @@ func TestNewOauth2AuthManagerAuthenticatesCatalogRequests(t
*testing.T) {
}, headers)
}
-// ExampleNewOauth2AuthManager connects to Google's BigLake Iceberg REST
+// ExampleNewOAuth2AuthManager connects to Google's BigLake Iceberg REST
// catalog with Application Default Credentials.
-func ExampleNewOauth2AuthManager() {
+func ExampleNewOAuth2AuthManager() {
ctx := context.Background()
// Application Default Credentials: a service-account key file, gcloud
user
@@ -105,7 +105,7 @@ func ExampleNewOauth2AuthManager() {
}
cat, err := rest.NewCatalog(ctx, "biglake",
"https://biglake.googleapis.com/iceberg/v1/restcatalog",
- rest.WithAuthManager(rest.NewOauth2AuthManager(ts)),
+ rest.WithAuthManager(rest.NewOAuth2AuthManager(ts)),
rest.WithWarehouseLocation("gs://lakehouse-public-data"),
// The project BigLake bills the requests to.
rest.WithHeaders(map[string]string{"x-goog-user-project":
"my-project"}),
diff --git a/catalog/rest/googleauth/googleauth.go
b/catalog/rest/googleauth/googleauth.go
index 0b08c2203..e6787ef48 100644
--- a/catalog/rest/googleauth/googleauth.go
+++ b/catalog/rest/googleauth/googleauth.go
@@ -55,7 +55,7 @@
// Java. They use a client with the default transport and a 60-second timeout.
// To use a specific client, put it in the context's oauth2.HTTPClient value
// when loading the catalog, or build the source with TokenSource and pass
-// rest.NewOauth2AuthManager(ts) to rest.WithAuthManager. One exception: on
+// rest.NewOAuth2AuthManager(ts) to rest.WithAuthManager. One exception: on
// Google Cloud compute, Application Default Credentials come from the metadata
// server, which the Google library always reaches through its own client.
package googleauth
@@ -98,7 +98,7 @@ func init() {
return nil, err
}
- return rest.NewOauth2AuthManager(ts), nil
+ return rest.NewOAuth2AuthManager(ts), nil
})
}
diff --git a/catalog/rest/refresh_table_credentials_test.go
b/catalog/rest/refresh_table_credentials_test.go
index 2692011ee..9e160c54e 100644
--- a/catalog/rest/refresh_table_credentials_test.go
+++ b/catalog/rest/refresh_table_credentials_test.go
@@ -610,9 +610,9 @@ func
TestRefreshTableCredentialsClearsADLSAuthShadowingVendedToken(t *testing.T)
tbl, _ := newExternalTable(t, cat, scheme,
table.WithSavedConfig(iceberg.Properties{
iceio.ADLSSharedKeyAccountName: "warehouse",
iceio.ADLSSharedKeyAccountKey: "stale-key",
- iceio.ADLSSasTokenPrefix + "warehouse": "stale-sas",
+ iceio.ADLSSASTokenPrefix + "warehouse": "stale-sas",
iceio.ADLSConnectionStringPrefix + "warehouse": "stale-conn",
- iceio.ADLSSasTokenPrefix + otherHost: "other-sas",
+ iceio.ADLSSASTokenPrefix + otherHost: "other-sas",
}))
refreshed, err := cat.RefreshTableCredentials(context.Background(), tbl)
@@ -625,12 +625,12 @@ func
TestRefreshTableCredentialsClearsADLSAuthShadowingVendedToken(t *testing.T)
for _, k := range []string{
iceio.ADLSSharedKeyAccountName,
iceio.ADLSSharedKeyAccountKey,
- iceio.ADLSSasTokenPrefix + "warehouse",
+ iceio.ADLSSASTokenPrefix + "warehouse",
iceio.ADLSConnectionStringPrefix + "warehouse",
} {
assert.NotContains(t, props, k, "stale credential %q must not
survive the refresh", k)
}
- assert.Equal(t, "other-sas", props[iceio.ADLSSasTokenPrefix+otherHost])
+ assert.Equal(t, "other-sas", props[iceio.ADLSSASTokenPrefix+otherHost])
}
// tableResponseCalls are the catalog methods that build a table from a
@@ -710,9 +710,9 @@ func
TestTableResponseVendedADLSTokenClearsShadowingCredentials(t *testing.T) {
// account's shared key.
iceio.ADLSSharedKeyAccountName: "other",
iceio.ADLSSharedKeyAccountKey: "other-key",
- iceio.ADLSSasTokenPrefix + host: "stale-sas",
+ iceio.ADLSSASTokenPrefix + host: "stale-sas",
iceio.ADLSConnectionStringPrefix + "acct":
"stale-conn",
- iceio.ADLSSasTokenPrefix + otherHost: "other-sas",
+ iceio.ADLSSASTokenPrefix + otherHost: "other-sas",
iceio.ADLSConnectionStringPrefix + "other":
"other-conn",
},
map[string]string{iceio.ADLSToken: "vended-token"})
@@ -722,12 +722,12 @@ func
TestTableResponseVendedADLSTokenClearsShadowingCredentials(t *testing.T) {
for _, k := range []string{
iceio.ADLSSharedKeyAccountName,
iceio.ADLSSharedKeyAccountKey,
- iceio.ADLSSasTokenPrefix + host,
+ iceio.ADLSSASTokenPrefix + host,
iceio.ADLSConnectionStringPrefix + "acct",
} {
assert.NotContains(t, props, k, "%s: credential %q
would be selected ahead of the token", name, k)
}
- assert.Equal(t, "other-sas",
props[iceio.ADLSSasTokenPrefix+otherHost], name)
+ assert.Equal(t, "other-sas",
props[iceio.ADLSSASTokenPrefix+otherHost], name)
assert.Equal(t, "other-conn",
props[iceio.ADLSConnectionStringPrefix+"other"], name)
}
}
diff --git a/catalog/rest/rest.go b/catalog/rest/rest.go
index b8dca69b0..3c2b62129 100644
--- a/catalog/rest/rest.go
+++ b/catalog/rest/rest.go
@@ -1013,19 +1013,19 @@ func NewCatalog(ctx context.Context, name, uri string,
opts ...Option) (*Catalog
}
// defaultOAuthTimeout bounds a single OAuth token-refresh request made by the
-// built-in Oauth2AuthManager. oauth2's TokenSource.Token() takes no context,
so
+// built-in OAuth2AuthManager. oauth2's TokenSource.Token() takes no context,
so
// this Timeout on the refresh client is what keeps a stalled or black-holing
// token endpoint from blocking auth — and therefore any request that triggers
a
// refresh, including asynchronous metrics reports — indefinitely.
const defaultOAuthTimeout = 60 * time.Second
-// setupOAuthManager creates an Oauth2AuthManager based on the provided
options.
+// setupOAuthManager creates an OAuth2AuthManager based on the provided
options.
// It uses golang.org/x/oauth2 for token management, caching, and thread-safe
refresh.
// The returned cleanup closes an internally-created OAuth transport, if any.
func setupOAuthManager(r *Catalog, cl *http.Client, opts *options)
(AuthManager, func()) {
// If a static token is provided, use it directly.
if opts.oauthToken != "" {
- return &Oauth2AuthManager{
+ return &OAuth2AuthManager{
tokenSource: oauth2.StaticTokenSource(&oauth2.Token{
AccessToken: opts.oauthToken,
TokenType: "Bearer",
@@ -1100,7 +1100,7 @@ func setupOAuthManager(r *Catalog, cl *http.Client, opts
*options) (AuthManager,
}
ctx = context.WithValue(ctx, oauth2.HTTPClient, oauthClient)
- return &Oauth2AuthManager{
+ return &OAuth2AuthManager{
tokenSource: cfg.TokenSource(ctx),
}, closeIdleConnections
}
diff --git a/catalog/rest/vended_creds_test.go
b/catalog/rest/vended_creds_test.go
index 6b32193ab..fdf6dd363 100644
--- a/catalog/rest/vended_creds_test.go
+++ b/catalog/rest/vended_creds_test.go
@@ -843,9 +843,9 @@ func TestPrefixScopedIOClearsStaleADLSAuthForVendedToken(t
*testing.T) {
iceio.ADLSEndpoint:
"dfs.core.windows.net",
iceio.ADLSSharedKeyAccountName: "acct",
iceio.ADLSSharedKeyAccountKey: "stale-key",
- iceio.ADLSSasTokenPrefix + host: "stale-sas",
+ iceio.ADLSSASTokenPrefix + host: "stale-sas",
iceio.ADLSConnectionStringPrefix + "acct":
"stale-connection-string",
- iceio.ADLSSasTokenPrefix + otherHost: "other-sas",
+ iceio.ADLSSASTokenPrefix + otherHost: "other-sas",
iceio.ADLSConnectionStringPrefix + "other":
"other-connection-string",
}, []StorageCredential{{
Prefix: "abfss://container@" + host + "/",
@@ -862,12 +862,12 @@ func
TestPrefixScopedIOClearsStaleADLSAuthForVendedToken(t *testing.T) {
// vended token is what actually authenticates the read.
assert.NotContains(t, props, iceio.ADLSSharedKeyAccountName)
assert.NotContains(t, props, iceio.ADLSSharedKeyAccountKey)
- assert.NotContains(t, props, iceio.ADLSSasTokenPrefix+host)
+ assert.NotContains(t, props, iceio.ADLSSASTokenPrefix+host)
assert.NotContains(t, props, iceio.ADLSConnectionStringPrefix+"acct")
// Another account's SAS token and connection string never apply here
and
// are kept.
- assert.Equal(t, "other-sas", props[iceio.ADLSSasTokenPrefix+otherHost])
+ assert.Equal(t, "other-sas", props[iceio.ADLSSASTokenPrefix+otherHost])
assert.Equal(t, "other-connection-string",
props[iceio.ADLSConnectionStringPrefix+"other"])
}
@@ -879,7 +879,7 @@ func
TestPrefixScopedIOKeepsCredentialsWhenVendedADLSTokenIsEmpty(t *testing.T)
p := newPrefixScopedIO(context.Background(), iceberg.Properties{
iceio.ADLSSharedKeyAccountName: "acct",
iceio.ADLSSharedKeyAccountKey: "working-key",
- iceio.ADLSSasTokenPrefix + host: "working-sas",
+ iceio.ADLSSASTokenPrefix + host: "working-sas",
}, []StorageCredential{{
Prefix: "abfss://container@" + host + "/",
Config: iceberg.Properties{iceio.ADLSToken: ""},
@@ -892,7 +892,7 @@ func
TestPrefixScopedIOKeepsCredentialsWhenVendedADLSTokenIsEmpty(t *testing.T)
// a weaker auth method.
assert.Equal(t, "acct", props[iceio.ADLSSharedKeyAccountName])
assert.Equal(t, "working-key", props[iceio.ADLSSharedKeyAccountKey])
- assert.Equal(t, "working-sas", props[iceio.ADLSSasTokenPrefix+host])
+ assert.Equal(t, "working-sas", props[iceio.ADLSSASTokenPrefix+host])
}
func TestVendedCredsRefreshClearsStaleADLSAuth(t *testing.T) {
@@ -918,8 +918,8 @@ func TestVendedCredsRefreshClearsStaleADLSAuth(t
*testing.T) {
r.props = iceberg.Properties{
iceio.ADLSSharedKeyAccountName: "acct",
iceio.ADLSSharedKeyAccountKey: "stale-key",
- iceio.ADLSSasTokenPrefix + host: "stale-sas",
- iceio.ADLSSasTokenPrefix + otherHost: "other-sas",
+ iceio.ADLSSASTokenPrefix + host: "stale-sas",
+ iceio.ADLSSASTokenPrefix + otherHost: "other-sas",
}
// Force the refresh branch: a cached IO whose credentials have expired.
r.cachedIO = iceio.LocalFS{}
@@ -933,8 +933,8 @@ func TestVendedCredsRefreshClearsStaleADLSAuth(t
*testing.T) {
assert.Equal(t, "fresh-token", captured[iceio.ADLSToken])
assert.NotContains(t, captured, iceio.ADLSSharedKeyAccountName)
assert.NotContains(t, captured, iceio.ADLSSharedKeyAccountKey)
- assert.NotContains(t, captured, iceio.ADLSSasTokenPrefix+host)
- assert.Equal(t, "other-sas",
captured[iceio.ADLSSasTokenPrefix+otherHost])
+ assert.NotContains(t, captured, iceio.ADLSSASTokenPrefix+host)
+ assert.Equal(t, "other-sas",
captured[iceio.ADLSSASTokenPrefix+otherHost])
}
// TestVendedCredsRefreshedADLSTokenExpiry checks that a vended adls.token gets
@@ -988,14 +988,14 @@ func TestVendedCredsRefreshedADLSTokenExpiry(t
*testing.T) {
r.nowFunc = func() time.Time { return now }
r.location = scheme + "://container@" + host +
"/table/metadata.json"
r.props = iceberg.Properties{
- iceio.ADLSSasTokenPrefix + host: "stale-sas",
+ iceio.ADLSSASTokenPrefix + host: "stale-sas",
keyAdlsSasExpiresAtMs + "." + host: staleExpiry,
keyAdlsSasExpiresAtMs: staleExpiry,
keyS3TokenExpiresAtMs: staleExpiry,
keyGcsOAuthExpiresAt: staleExpiry,
// Overwritten when the token is vended with
its own expiration-time.
keyExpirationTime:
staleExpiry,
- iceio.ADLSSasTokenPrefix + otherHost:
"other-sas",
+ iceio.ADLSSASTokenPrefix + otherHost:
"other-sas",
keyAdlsSasExpiresAtMs + "." + otherHost:
staleExpiry,
}
// Force the refresh branch: a cached IO whose
credentials have expired.
@@ -1251,7 +1251,7 @@ func TestPrefixScopedIOKeysFilesystemsByContainer(t
*testing.T) {
{name: "no matching credential"},
{name: "one credential covering both containers", credentials:
[]StorageCredential{{
Prefix: scheme + "://",
- Config: iceberg.Properties{iceio.ADLSSasTokenPrefix +
"acct.dfs.core.windows.net": "sig=sas"},
+ Config: iceberg.Properties{iceio.ADLSSASTokenPrefix +
"acct.dfs.core.windows.net": "sig=sas"},
}}},
} {
t.Run(tc.name, func(t *testing.T) {
diff --git a/internal/adlsauth/adlsauth.go b/internal/adlsauth/adlsauth.go
index ec14e7c23..3fe561da2 100644
--- a/internal/adlsauth/adlsauth.go
+++ b/internal/adlsauth/adlsauth.go
@@ -78,6 +78,6 @@ func AccountForURL(parsed *url.URL) (Account, bool) {
func ClearTokenShadowingCredentials(props map[string]string, acct Account) {
delete(props, iceio.ADLSSharedKeyAccountName)
delete(props, iceio.ADLSSharedKeyAccountKey)
- delete(props, iceio.ADLSSasTokenPrefix+acct.Host)
+ delete(props, iceio.ADLSSASTokenPrefix+acct.Host)
delete(props, iceio.ADLSConnectionStringPrefix+acct.Name)
}
diff --git a/io/config.go b/io/config.go
index 59faf04de..fb63d9dce 100644
--- a/io/config.go
+++ b/io/config.go
@@ -53,7 +53,7 @@ const (
// Constants for Azure configuration options
const (
- ADLSSasTokenPrefix = "adls.sas-token."
+ ADLSSASTokenPrefix = "adls.sas-token."
ADLSConnectionStringPrefix = "adls.connection-string."
ADLSSharedKeyAccountName = "adls.auth.shared-key.account.name"
ADLSSharedKeyAccountKey = "adls.auth.shared-key.account.key"
diff --git a/io/gocloud/azure/azure.go b/io/gocloud/azure/azure.go
index 8a8b7eab1..32e3d2152 100644
--- a/io/gocloud/azure/azure.go
+++ b/io/gocloud/azure/azure.go
@@ -148,7 +148,7 @@ func createAzureBucketWithOptions(
credentialFactories azureCredentialFactories,
clientOptions *container.ClientOptions,
) (*blob.Bucket, error) {
- adlsSasTokens := propertiesWithPrefix(props, io.ADLSSasTokenPrefix)
+ adlsSasTokens := propertiesWithPrefix(props, io.ADLSSASTokenPrefix)
adlsConnectionStrings := propertiesWithPrefix(props,
io.ADLSConnectionStringPrefix)
// Construct the client
diff --git a/io/gocloud/azure/token_test.go b/io/gocloud/azure/token_test.go
index 2fde1f744..693e98af4 100644
--- a/io/gocloud/azure/token_test.go
+++ b/io/gocloud/azure/token_test.go
@@ -90,7 +90,7 @@ func TestAzureTokenAuthentication(t *testing.T) {
name: "unrelated SAS and connection string do not
override token",
props: map[string]string{
icebergio.ADLSToken: token,
- icebergio.ADLSSasTokenPrefix +
"other.dfs.core.windows.net": "sig=other",
+ icebergio.ADLSSASTokenPrefix +
"other.dfs.core.windows.net": "sig=other",
icebergio.ADLSConnectionStringPrefix + "other":
"invalid-connection-string",
},
wantAuthPrefix: "Bearer " + token,
@@ -108,7 +108,7 @@ func TestAzureTokenAuthentication(t *testing.T) {
name: "SAS precedes token",
props: map[string]string{
icebergio.ADLSToken: token,
- icebergio.ADLSSasTokenPrefix +
"testaccount.dfs.core.windows.net": "sig=sas-signature",
+ icebergio.ADLSSASTokenPrefix +
"testaccount.dfs.core.windows.net": "sig=sas-signature",
},
wantSAS: "sas-signature",
},
@@ -262,7 +262,7 @@ func TestClearTokenShadowingCredentialsSelectsToken(t
*testing.T) {
{
name: "SAS for the account",
props: map[string]string{
- icebergio.ADLSSasTokenPrefix +
"testaccount.dfs.core.windows.net": "sig=sas-signature",
+ icebergio.ADLSSASTokenPrefix +
"testaccount.dfs.core.windows.net": "sig=sas-signature",
},
},
{
@@ -276,9 +276,9 @@ func TestClearTokenShadowingCredentialsSelectsToken(t
*testing.T) {
props: map[string]string{
icebergio.ADLSSharedKeyAccountName:
"testaccount",
icebergio.ADLSSharedKeyAccountKey:
"YQ==",
- icebergio.ADLSSasTokenPrefix +
"testaccount.dfs.core.windows.net": "sig=sas-signature",
+ icebergio.ADLSSASTokenPrefix +
"testaccount.dfs.core.windows.net": "sig=sas-signature",
icebergio.ADLSConnectionStringPrefix +
"testaccount": "invalid-connection-string",
- icebergio.ADLSSasTokenPrefix +
"other.dfs.core.windows.net": "sig=other",
+ icebergio.ADLSSASTokenPrefix +
"other.dfs.core.windows.net": "sig=other",
icebergio.ADLSConnectionStringPrefix + "other":
"invalid-connection-string",
},
},
diff --git a/table/delete_parquet_settings_test.go
b/table/delete_parquet_settings_test.go
index e138297b6..2e3cea0eb 100644
--- a/table/delete_parquet_settings_test.go
+++ b/table/delete_parquet_settings_test.go
@@ -128,7 +128,7 @@ func TestDeleteParquetSettingsOnDisk(t *testing.T) {
rec.Retain()
}
df, err = writer.writeFile(ctx, nil,
WriteTask{
- Uuid: uuid.New(), Schema:
fileSchema, Batches: batches, FileCount: 1,
+ UUID: uuid.New(), Schema:
fileSchema, Batches: batches, FileCount: 1,
})
require.NoError(t, err)
}
@@ -318,7 +318,7 @@ func TestDeleteParquetCodecOverrideWithoutLevelWrites(t
*testing.T) {
withContent(content), withFileSchema(schema),
withEqualityFieldIDs(equalityIDs))
require.NoError(t, err)
record.Retain()
- dataFile, err := writer.writeFile(t.Context(), nil,
WriteTask{Uuid: uuid.New(), Schema: schema, Batches:
[]arrow.RecordBatch{record}, FileCount: 1})
+ dataFile, err := writer.writeFile(t.Context(), nil,
WriteTask{UUID: uuid.New(), Schema: schema, Batches:
[]arrow.RecordBatch{record}, FileCount: 1})
require.NoError(t, err)
input, err := fs.Open(t.Context(), dataFile.FilePath())
require.NoError(t, err)
diff --git a/table/delete_record_writer.go b/table/delete_record_writer.go
index 48047cac1..1e23360f1 100644
--- a/table/delete_record_writer.go
+++ b/table/delete_record_writer.go
@@ -102,7 +102,7 @@ func (w *concurrentDataFileWriter) writeDeleteRecords(ctx
context.Context, locat
count, _ := nextCount()
fileCount++
task := WriteTask{
- Uuid: *args.writeUUID, ID: count,
PartitionID: iceberg.UnpartitionedSpec.ID(),
+ UUID: *args.writeUUID, ID: count,
PartitionID: iceberg.UnpartitionedSpec.ID(),
FileCount: fileCount, Schema: schema,
Batches: batch,
}
if !yield(task) {
diff --git a/table/geo_write_test.go b/table/geo_write_test.go
index ae0f90ac6..9b8338de9 100644
--- a/table/geo_write_test.go
+++ b/table/geo_write_test.go
@@ -134,7 +134,7 @@ func TestWriteGeometryColumnPopulatesBounds(t *testing.T) {
require.NoError(t, err)
df, err := writer.writeFile(t.Context(), nil, WriteTask{
- Uuid: uuid.New(),
+ UUID: uuid.New(),
ID: 0,
FileCount: 1,
Schema: schema,
@@ -194,7 +194,7 @@ func TestWriteGeometryColumnAllNull(t *testing.T) {
require.NoError(t, err)
df, err := writer.writeFile(t.Context(), nil, WriteTask{
- Uuid: uuid.New(),
+ UUID: uuid.New(),
ID: 0,
FileCount: 1,
Schema: schema,
@@ -241,7 +241,7 @@ func TestWriteGeometryColumnMetricsNone(t *testing.T) {
require.NoError(t, err)
df, err := writer.writeFile(t.Context(), nil, WriteTask{
- Uuid: uuid.New(),
+ UUID: uuid.New(),
ID: 0,
FileCount: 1,
Schema: schema,
@@ -286,7 +286,7 @@ func TestWriteGeometryColumnCheckedAllocator(t *testing.T) {
require.NoError(t, err)
df, err := writer.writeFile(ctx, nil, WriteTask{
- Uuid: uuid.New(),
+ UUID: uuid.New(),
ID: 0,
FileCount: 1,
Schema: schema,
@@ -332,7 +332,7 @@ func TestWriteGeoColumnMultiRowGroupStats(t *testing.T) {
defer second.Release()
df, err := writer.writeFile(t.Context(), nil, WriteTask{
- Uuid: uuid.New(),
+ UUID: uuid.New(),
ID: 0,
FileCount: 1,
Schema: schema,
diff --git a/table/metadata.go b/table/metadata.go
index 089aecc21..2b0bf9a7d 100644
--- a/table/metadata.go
+++ b/table/metadata.go
@@ -3744,13 +3744,13 @@ func NewMetadataWithUUID(sc *iceberg.Schema, partitions
*iceberg.PartitionSpec,
return builder.Build()
}
-type ReassignedIds struct {
+type ReassignedIDs struct {
schema *iceberg.Schema
partitionSpec *iceberg.PartitionSpec
sortOrder SortOrder
}
-func reassignIDs(sc *iceberg.Schema, partitions *iceberg.PartitionSpec,
sortOrder SortOrder) (*ReassignedIds, error) {
+func reassignIDs(sc *iceberg.Schema, partitions *iceberg.PartitionSpec,
sortOrder SortOrder) (*ReassignedIDs, error) {
previousMapFn := sc.FindColumnName
freshSc, err := iceberg.AssignFreshSchemaIDs(sc, nil)
if err != nil {
@@ -3787,7 +3787,7 @@ func reassignIDs(sc *iceberg.Schema, partitions
*iceberg.PartitionSpec, sortOrde
return nil, fmt.Errorf("%w: %w", ErrInvalidMetadata, err)
}
- return &ReassignedIds{
+ return &ReassignedIDs{
schema: freshSc,
partitionSpec: &freshPartitions,
sortOrder: freshSortOrder,
diff --git a/table/metadata_builder_internal_test.go
b/table/metadata_builder_internal_test.go
index 83c0ddceb..19210b809 100644
--- a/table/metadata_builder_internal_test.go
+++ b/table/metadata_builder_internal_test.go
@@ -2322,10 +2322,10 @@ func TestSetReservedPropertiesFails(t *testing.T) {
// Test setting multiple properties where one is reserved
err = builder.SetProperties(iceberg.Properties{
"custom-property": "allowed",
- PropertyCurrentSnapshotId: "12345",
+ PropertyCurrentSnapshotID: "12345",
"another-custom-property": "also-allowed",
})
- require.ErrorContains(t, err, "can't set reserved property
"+PropertyCurrentSnapshotId)
+ require.ErrorContains(t, err, "can't set reserved property
"+PropertyCurrentSnapshotID)
}
func TestSnapshotTimestampReservedPropertyKey(t *testing.T) {
@@ -2383,10 +2383,10 @@ func TestRemoveReservedPropertiesFails(t *testing.T) {
// Test removing multiple properties where one is reserved
err := builder.RemoveProperties([]string{
"custom-property",
- PropertyUuid,
+ PropertyUUID,
"another-custom-property",
})
- require.ErrorContains(t, err, "can't remove reserved property
"+PropertyUuid)
+ require.ErrorContains(t, err, "can't remove reserved property
"+PropertyUUID)
// Add some custom properties first, then test that removing
non-reserved properties works
require.NoError(t, builder.SetProperties(iceberg.Properties{
diff --git a/table/parquet_bloom_properties_test.go
b/table/parquet_bloom_properties_test.go
index 2409dc384..04e641ea0 100644
--- a/table/parquet_bloom_properties_test.go
+++ b/table/parquet_bloom_properties_test.go
@@ -91,7 +91,7 @@ func TestParquetBloomLogicalPathsOnDisk(t *testing.T) {
require.NoError(t, err)
batch.Retain()
df, err = writer.writeFile(t.Context(), nil,
WriteTask{
- Uuid: uuid.New(), Schema: fileSchema,
Batches: []arrow.RecordBatch{batch}, FileCount: 1,
+ UUID: uuid.New(), Schema: fileSchema,
Batches: []arrow.RecordBatch{batch}, FileCount: 1,
})
require.NoError(t, err)
}
diff --git a/table/parquet_column_stats_test.go
b/table/parquet_column_stats_test.go
index bc5086b67..48548806d 100644
--- a/table/parquet_column_stats_test.go
+++ b/table/parquet_column_stats_test.go
@@ -89,7 +89,7 @@ func writeStatsSettingsFile(t *testing.T, mode string, props
iceberg.Properties)
writer, err := newDataFileWriter(loc, iceio.LocalFS{}, builder,
props, withFileSchema(fileSchema))
require.NoError(t, err)
dataFile, err := writer.writeFile(t.Context(), nil, WriteTask{
- Uuid: uuid.New(), Schema: schema, FileCount: 1,
Batches: []arrow.RecordBatch{record},
+ UUID: uuid.New(), Schema: schema, FileCount: 1,
Batches: []arrow.RecordBatch{record},
})
require.NoError(t, err)
@@ -242,7 +242,7 @@ func writeStatsSettingsDeleteFile(t *testing.T, mode
string, content iceberg.Man
}
require.NoError(t, err)
dataFile, err := writer.writeFile(t.Context(), nil, WriteTask{
- Uuid: uuid.New(), Schema: fileSchema, FileCount: 1,
Batches: []arrow.RecordBatch{record},
+ UUID: uuid.New(), Schema: fileSchema, FileCount: 1,
Batches: []arrow.RecordBatch{record},
})
require.NoError(t, err)
diff --git a/table/properties.go b/table/properties.go
index e5658b4f7..e8e9474a6 100644
--- a/table/properties.go
+++ b/table/properties.go
@@ -246,9 +246,9 @@ func IsGCEnabled(props iceberg.Properties) bool {
// Reserved properties
const (
PropertyFormatVersion = "format-version"
- PropertyUuid = "uuid"
+ PropertyUUID = "uuid"
PropertySnapshotCount = "snapshot-count"
- PropertyCurrentSnapshotId = "current-snapshot-id"
+ PropertyCurrentSnapshotID = "current-snapshot-id"
PropertyCurrentSnapshotSummary = "current-snapshot-summary"
PropertyCurrentSnapshotTimestamp = "current-snapshot-timestamp-ms"
PropertyCurrentSchema = "current-schema"
@@ -258,9 +258,9 @@ const (
var reservedProperties = [...]string{
PropertyFormatVersion,
- PropertyUuid,
+ PropertyUUID,
PropertySnapshotCount,
- PropertyCurrentSnapshotId,
+ PropertyCurrentSnapshotID,
PropertyCurrentSnapshotSummary,
PropertyCurrentSnapshotTimestamp,
PropertyCurrentSchema,
diff --git a/table/rewrite_position_delete_files.go
b/table/rewrite_position_delete_files.go
index 758679a74..f57cd7323 100644
--- a/table/rewrite_position_delete_files.go
+++ b/table/rewrite_position_delete_files.go
@@ -383,7 +383,7 @@ func (t *Transaction) RewritePositionDeleteFiles(
record := b.NewRecordBatch()
b.Release()
task := WriteTask{
- Uuid: uuid.New(), PartitionID: spec.ID(),
+ UUID: uuid.New(), PartitionID: spec.ID(),
FileCount: 1, Schema:
iceberg.PositionalDeleteSchema,
Batches: []arrow.RecordBatch{record},
}
diff --git a/table/writer.go b/table/writer.go
index 582c48391..c9235c916 100644
--- a/table/writer.go
+++ b/table/writer.go
@@ -37,7 +37,7 @@ import (
// WriteTask writes all its Batches into one file. The rolling writer bypasses
// it, naming files via dataFileName directly.
type WriteTask struct {
- Uuid uuid.UUID
+ UUID uuid.UUID
ID int
PartitionID int // PartitionID is the partition identifier used in data
file naming.
FileCount int // FileCount is a sequential counter for files written
by this task.
@@ -49,7 +49,7 @@ type WriteTask struct {
}
func (w WriteTask) GenerateDataFileName(extension string) string {
- return dataFileName(w.Uuid, w.ID, w.PartitionID, w.FileCount, extension)
+ return dataFileName(w.UUID, w.ID, w.PartitionID, w.FileCount, extension)
}
// dataFileName builds a data file name, mirroring the Java API:
diff --git a/table/writer_invariants_bench_test.go
b/table/writer_invariants_bench_test.go
index 780444409..85110be55 100644
--- a/table/writer_invariants_bench_test.go
+++ b/table/writer_invariants_bench_test.go
@@ -82,7 +82,7 @@ func BenchmarkDefaultDataFileWriter(b *testing.B) {
for i := 0; b.Loop(); i++ {
record.Retain()
_, err := writer.writeFile(b.Context(), nil, WriteTask{
- Uuid: writeUUID, ID: i, FileCount: 1, Schema: schema,
+ UUID: writeUUID, ID: i, FileCount: 1, Schema: schema,
Batches: []arrow.RecordBatch{record},
})
if err != nil {
diff --git a/table/writer_schema_projection_test.go
b/table/writer_schema_projection_test.go
index a3d3f6c31..3121d775a 100644
--- a/table/writer_schema_projection_test.go
+++ b/table/writer_schema_projection_test.go
@@ -413,7 +413,7 @@ func TestDefaultDataFileWriterReusesExactBatch(t
*testing.T) {
record.Retain()
_, err = writer.writeFile(t.Context(), nil, WriteTask{
- Uuid: uuid.New(), ID: 1, FileCount: 1, Schema: schema,
+ UUID: uuid.New(), ID: 1, FileCount: 1, Schema: schema,
Batches: []arrow.RecordBatch{record},
})
require.NoError(t, err)
diff --git a/table/writer_test.go b/table/writer_test.go
index eac6c2d71..37f381d95 100644
--- a/table/writer_test.go
+++ b/table/writer_test.go
@@ -38,7 +38,7 @@ func TestGenerateDataFileName(t *testing.T) {
{
name: "unpartitioned table first file",
task: WriteTask{
- Uuid:
uuid.MustParse("12345678-1234-1234-1234-123456789abc"),
+ UUID:
uuid.MustParse("12345678-1234-1234-1234-123456789abc"),
ID: 0,
PartitionID: 0,
FileCount: 1,
@@ -49,7 +49,7 @@ func TestGenerateDataFileName(t *testing.T) {
{
name: "unpartitioned table multiple files",
task: WriteTask{
- Uuid:
uuid.MustParse("12345678-1234-1234-1234-123456789abc"),
+ UUID:
uuid.MustParse("12345678-1234-1234-1234-123456789abc"),
ID: 0,
PartitionID: 0,
FileCount: 42,
@@ -60,7 +60,7 @@ func TestGenerateDataFileName(t *testing.T) {
{
name: "partitioned table first partition",
task: WriteTask{
- Uuid:
uuid.MustParse("87654321-4321-4321-4321-cba987654321"),
+ UUID:
uuid.MustParse("87654321-4321-4321-4321-cba987654321"),
ID: 1,
PartitionID: 0,
FileCount: 1,
@@ -71,7 +71,7 @@ func TestGenerateDataFileName(t *testing.T) {
{
name: "partitioned table second partition",
task: WriteTask{
- Uuid:
uuid.MustParse("87654321-4321-4321-4321-cba987654321"),
+ UUID:
uuid.MustParse("87654321-4321-4321-4321-cba987654321"),
ID: 2,
PartitionID: 1,
FileCount: 1,
@@ -82,7 +82,7 @@ func TestGenerateDataFileName(t *testing.T) {
{
name: "partitioned table multiple files in partition",
task: WriteTask{
- Uuid:
uuid.MustParse("87654321-4321-4321-4321-cba987654321"),
+ UUID:
uuid.MustParse("87654321-4321-4321-4321-cba987654321"),
ID: 3,
PartitionID: 2,
FileCount: 15,
@@ -93,7 +93,7 @@ func TestGenerateDataFileName(t *testing.T) {
{
name: "large partition ID",
task: WriteTask{
- Uuid:
uuid.MustParse("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
+ UUID:
uuid.MustParse("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
ID: 100,
PartitionID: 12345,
FileCount: 99999,
@@ -104,7 +104,7 @@ func TestGenerateDataFileName(t *testing.T) {
{
name: "more than 5 digits",
task: WriteTask{
- Uuid:
uuid.MustParse("ffffffff-ffff-ffff-ffff-ffffffffffff"),
+ UUID:
uuid.MustParse("ffffffff-ffff-ffff-ffff-ffffffffffff"),
ID: 123456,
PartitionID: 567890,
FileCount: 123456,
@@ -127,7 +127,7 @@ func TestGenerateDataFileNameFormat(t *testing.T) {
// {partitionId:05d}-{taskId}-{operationId}-{fileCount:05d}.{extension}
task := WriteTask{
- Uuid:
uuid.MustParse("12345678-1234-1234-1234-123456789abc"),
+ UUID:
uuid.MustParse("12345678-1234-1234-1234-123456789abc"),
ID: 5,
PartitionID: 3,
FileCount: 7,
@@ -150,10 +150,10 @@ func TestGenerateDataFileNameUniqueness(t *testing.T) {
// Test that different tasks generate different filenames
baseUUID := uuid.MustParse("12345678-1234-1234-1234-123456789abc")
- task1 := WriteTask{Uuid: baseUUID, ID: 0, PartitionID: 0, FileCount: 1}
- task2 := WriteTask{Uuid: baseUUID, ID: 0, PartitionID: 0, FileCount: 2}
- task3 := WriteTask{Uuid: baseUUID, ID: 1, PartitionID: 0, FileCount: 1}
- task4 := WriteTask{Uuid: baseUUID, ID: 0, PartitionID: 1, FileCount: 1}
+ task1 := WriteTask{UUID: baseUUID, ID: 0, PartitionID: 0, FileCount: 1}
+ task2 := WriteTask{UUID: baseUUID, ID: 0, PartitionID: 0, FileCount: 2}
+ task3 := WriteTask{UUID: baseUUID, ID: 1, PartitionID: 0, FileCount: 1}
+ task4 := WriteTask{UUID: baseUUID, ID: 0, PartitionID: 1, FileCount: 1}
file1 := task1.GenerateDataFileName("parquet")
file2 := task2.GenerateDataFileName("parquet")
@@ -210,7 +210,7 @@ func TestWriteFileHonorsExplicitSortOrderID(t *testing.T) {
rb := mustLoadRecordBatchFromJSON(arrowSc, `[{"id": 2}, {"id":
1}]`)
return WriteTask{
- Uuid: uuid.New(),
+ UUID: uuid.New(),
ID: id,
FileCount: 1,
Schema: schema,
@@ -252,7 +252,7 @@ func TestWriteFileRejectsPosDeleteSortOrderClaim(t
*testing.T) {
rb := mustLoadRecordBatchFromJSON(PositionalDeleteArrowSchema,
`[{"file_path": "file://t/data.parquet", "pos": 0}]`)
task := WriteTask{
- Uuid: uuid.New(),
+ UUID: uuid.New(),
ID: 0,
FileCount: 1,
Schema: iceberg.PositionalDeleteSchema,
diff --git a/website/src/configuration.md b/website/src/configuration.md
index 47c16cd37..4d48c82c3 100644
--- a/website/src/configuration.md
+++ b/website/src/configuration.md
@@ -81,7 +81,7 @@ including zero or malformed values.
| Group | Options |
|---|---|
-| Authentication | `WithCredential`, `WithOAuthToken`, `WithAuthManager`,
`NewOauth2AuthManager`, `WithAuthURI`, `WithScope`, `WithAudience`,
`WithResource` |
+| Authentication | `WithCredential`, `WithOAuthToken`, `WithAuthManager`,
`NewOAuth2AuthManager`, `WithAuthURI`, `WithScope`, `WithAudience`,
`WithResource` |
| AWS SigV4 | `WithSigV4`, `WithSigV4RegionSvc`, `WithSigner` |
| HTTP | `WithHeaders`, `WithTLSConfig`, `WithOAuthTLSConfig`,
`WithCustomTransport` |
| Catalog routing | `WithPrefix`, `WithWarehouseLocation`,
`WithMetadataLocation` |
@@ -155,7 +155,7 @@ config or proxy set with `WithCustomTransport`,
`WithTLSConfig` or
the default transport and a 60-second timeout. To use a specific client, put it
in the context's `oauth2.HTTPClient` value when loading the catalog, or build
the token source yourself (for example with `googleauth.TokenSource`) and pass
-`NewOauth2AuthManager(ts)` to `WithAuthManager`. One exception: on Google Cloud
+`NewOAuth2AuthManager(ts)` to `WithAuthManager`. One exception: on Google Cloud
compute, Application Default Credentials come from the metadata server, which
the Google library always reaches through its own client.
@@ -179,7 +179,7 @@ cat, err := catalog.Load(ctx, "biglake", iceberg.Properties{
`WithCredential` uses the OAuth2 client-credentials flow against the catalog's
token endpoint. For other identity providers, wrap any `oauth2.TokenSource`
with
-`NewOauth2AuthManager` and pass it to `WithAuthManager`. The Google setup above
+`NewOAuth2AuthManager` and pass it to `WithAuthManager`. The Google setup above
can also be written this way:
```go
@@ -188,7 +188,7 @@ if err != nil {
return err
}
cat, err := rest.NewCatalog(ctx, "biglake",
"https://biglake.googleapis.com/iceberg/v1/restcatalog",
- rest.WithAuthManager(rest.NewOauth2AuthManager(ts)),
+ rest.WithAuthManager(rest.NewOAuth2AuthManager(ts)),
rest.WithWarehouseLocation("gs://lakehouse-public-data"),
rest.WithHeaders(map[string]string{"x-goog-user-project":
"my-project"}))
```
@@ -392,7 +392,7 @@ Tuning properties:
|---|---|
| `adls.auth.shared-key.account.name` (`io.ADLSSharedKeyAccountName`) |
Account name. |
| `adls.auth.shared-key.account.key` (`io.ADLSSharedKeyAccountKey`) | Account
key. |
-| `adls.sas-token.<host>` (prefix `io.ADLSSasTokenPrefix`) | Per-host SAS
token. |
+| `adls.sas-token.<host>` (prefix `io.ADLSSASTokenPrefix`) | Per-host SAS
token. |
| `adls.connection-string.<account-name>` (prefix
`io.ADLSConnectionStringPrefix`) | Per-account connection string. |
| `adls.token` (`io.ADLSToken`) | Static Azure Storage access token, without
the `Bearer ` prefix. Subject to the precedence above; not refreshed. |
| `adls.client-id` (`io.ADLSClientID`) | Client ID of a user-assigned managed
identity. Used only when the explicit managed-identity authentication path is
selected. |
diff --git a/website/src/releases.md b/website/src/releases.md
index 5d0407113..c9aba4a93 100644
--- a/website/src/releases.md
+++ b/website/src/releases.md
@@ -107,6 +107,7 @@ Per-release notes (highlights, breaking changes,
contributors) are published on
- **RowDelta reports a concurrent deletion vector as a commit conflict.** If a
concurrent commit adds a deletion vector for a data file that a `RowDelta` also
adds one for, `Transaction.Commit` now fails with an error matching
`table.ErrConflictingDeleteFiles`, `table.ErrCommitFailed` and
`table.ErrTransactionUnusable`, and the transaction cannot be committed again.
Previously, the error matched none of them and the transaction stayed usable.
To resolve the conflict, reload the table and [...]
- **Schema JSON constructor uses the Go initialism.** Replace
`iceberg.NewSchemaFromJsonFields` with `iceberg.NewSchemaFromJSONFields`.
- **AWS identifiers use the Go initialism.** `glue.AwsProperties`,
`glue.WithAwsConfig` and `glue.WithAwsProperties` become `glue.AWSProperties`,
`glue.WithAWSConfig` and `glue.WithAWSProperties`; `sigv4.WithAwsConfig`
becomes `sigv4.WithAWSConfig`; `utils.WithAwsConfig` and `utils.GetAwsConfig`
become `utils.WithAWSConfig` and `utils.GetAWSConfig`; and
`config.CatalogConfig.AwsProfile` becomes `AWSProfile`. The `aws-profile` YAML
key is unchanged.
+- **Remaining exported names use Go initialisms.** `table.PropertyUuid` and
`table.PropertyCurrentSnapshotId` become `table.PropertyUUID` and
`table.PropertyCurrentSnapshotID`; `table.ReassignedIds` becomes
`table.ReassignedIDs`; the `table.WriteTask.Uuid` field becomes `UUID`;
`glue.CatalogIdKey` becomes `glue.CatalogIDKey`; `io.ADLSSasTokenPrefix`
becomes `io.ADLSSASTokenPrefix`; and `rest.Oauth2AuthManager` and
`rest.NewOauth2AuthManager` become `rest.OAuth2AuthManager` and `rest.NewO [...]
- **KMS factory registration now takes a context.** Change
`encryption.KMSFactory` implementations to accept `(context.Context,
map[string]string)` instead of only properties, and call
`encryption.LoadKeyManagementClient(ctx, props)` instead of
`LoadKeyManagementClient(props)`. The existing global `RegisterKMS`,
`UnregisterKMS`, and `GetRegisteredKMSNames` functions still use the default
registry; `RegisterKMS` still panics for invalid registrations. Use
`encryption.MustRegisterKMS` for [...]
- **Name-mapping child lookup renamed.** Replace `MappedField.GetField(name)`
with `MappedField.FindFieldByName(name)`, which returns `(*MappedField, bool)`.
The new method returns a pointer to the actual child field rather than a copy,
and reports a missing name with `false`.
- **Data file block size setter removed.**
`iceberg.DataFileBuilder.BlockSizeInBytes` is removed. New v1 manifests use the
Avro schema's 64 MiB default when the field is unset. V2/v3 omit this
deprecated field, and legacy v1 values remain readable.