kevinjqliu commented on code in PR #351:
URL: https://github.com/apache/iceberg-go/pull/351#discussion_r2006099386
##########
table/table_test.go:
##########
@@ -280,10 +280,10 @@ func (t *TableWritingTestSuite) writeParquet(fio
iceio.WriteFileIO, filePath str
func (t *TableWritingTestSuite) createTable(identifier table.Identifier,
formatVersion int, spec iceberg.PartitionSpec, sc *iceberg.Schema) *table.Table
{
meta, err := table.NewMetadata(sc, &spec, table.UnsortedSortOrder,
- t.getMetadataLoc(), iceberg.Properties{"format-version":
strconv.Itoa(formatVersion)})
+ t.location, iceberg.Properties{"format-version":
strconv.Itoa(formatVersion)})
Review Comment:
👍 table's base location (`t.Location()`) is actually the table metadata's
location (`t.metadata.Location()`).
https://github.com/apache/iceberg-go/blob/5142432b98b90b33c3f6af417de4d40aa3be8946/table/table.go#L57-L64
##########
table/table_test.go:
##########
@@ -280,10 +280,10 @@ func (t *TableWritingTestSuite) writeParquet(fio
iceio.WriteFileIO, filePath str
func (t *TableWritingTestSuite) createTable(identifier table.Identifier,
formatVersion int, spec iceberg.PartitionSpec, sc *iceberg.Schema) *table.Table
{
meta, err := table.NewMetadata(sc, &spec, table.UnsortedSortOrder,
- t.getMetadataLoc(), iceberg.Properties{"format-version":
strconv.Itoa(formatVersion)})
+ t.location, iceberg.Properties{"format-version":
strconv.Itoa(formatVersion)})
t.Require().NoError(err)
- return table.New(identifier, meta, t.location, iceio.LocalFS{}, nil)
+ return table.New(identifier, meta, t.getMetadataLoc(), iceio.LocalFS{},
nil)
Review Comment:
this is slightly confusing since a table can have base location, data
location, and metadata location.
##########
table/table_test.go:
##########
@@ -280,10 +280,10 @@ func (t *TableWritingTestSuite) writeParquet(fio
iceio.WriteFileIO, filePath str
func (t *TableWritingTestSuite) createTable(identifier table.Identifier,
formatVersion int, spec iceberg.PartitionSpec, sc *iceberg.Schema) *table.Table
{
meta, err := table.NewMetadata(sc, &spec, table.UnsortedSortOrder,
- t.getMetadataLoc(), iceberg.Properties{"format-version":
strconv.Itoa(formatVersion)})
+ t.location, iceberg.Properties{"format-version":
strconv.Itoa(formatVersion)})
t.Require().NoError(err)
- return table.New(identifier, meta, t.location, iceio.LocalFS{}, nil)
+ return table.New(identifier, meta, t.getMetadataLoc(), iceio.LocalFS{},
nil)
Review Comment:
`table.New`'s `location` parameter overrides tables metadata location
https://github.com/apache/iceberg-go/blob/5142432b98b90b33c3f6af417de4d40aa3be8946/table/table.go#L311-L315
--
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]