package table

import (
	
	
	
	

	
)

const (
	hdfsVersionHintFile = "version-hint.text"
	parquetFileExt      = ".parquet"
)

type hdfsTable struct {
	version int // The version of the table that has been loaded
	*baseTable
}

func ( int,  Identifier,  Metadata,  string,  objstore.Bucket) Table {
	return &hdfsTable{
		version: ,
		baseTable: &baseTable{
			identifier:       ,
			metadata:         ,
			metadataLocation: ,
			bucket:           ,
		},
	}
}

func ( *hdfsTable) ( ...WriterOption) (SnapshotWriter, error) {
	 := &hdfsSnapshotWriter{}
	.snapshotWriter = NewSnapshotWriter(.commit, .version, .bucket, , ...)
	return , nil
}

type hdfsSnapshotWriter struct {
	snapshotWriter
}

// commit is called by the underlying snapshotWriter to commit the snapshot.
// For HDFS, this means uploading the version hint file.
func ( *hdfsSnapshotWriter) ( context.Context,  int) error {
	// Upload the version hint
	 := []byte(fmt.Sprintf("%v", ))
	 := filepath.Join(.metadataDir(), hdfsVersionHintFile)
	return .bucket.Upload(, , bytes.NewReader())
}