Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming data types and files #1125

Merged
merged 5 commits into from
Jan 29, 2025
Merged

Renaming data types and files #1125

merged 5 commits into from
Jan 29, 2025

Conversation

Tang8330
Copy link
Contributor

No description provided.

@@ -90,7 +90,7 @@ func (s *Store) Append(ctx context.Context, tableData *optimization.TableData, u
return nil
}

func (s *Store) PrepareTemporaryTable(ctx context.Context, tableData *optimization.TableData, dwh *types.DwhTableConfig, tempTableID sql.TableIdentifier, _ sql.TableIdentifier, opts types.AdditionalSettings, createTempTable bool) error {
func (s *Store) PrepareTemporaryTable(ctx context.Context, tableData *optimization.TableData, dwh *types.DestinationTableConfig, tempTableID sql.TableIdentifier, _ sql.TableIdentifier, opts types.AdditionalSettings, createTempTable bool) error {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed DwhTableConfig -> DestinationTableConfig

@Tang8330 Tang8330 marked this pull request as ready for review January 29, 2025 16:58
@Tang8330 Tang8330 requested a review from a team as a code owner January 29, 2025 16:58
@@ -40,7 +40,7 @@ const (
type Store struct {
// If [auditRows] is enabled, we will perform an additional query to ensure that the number of rows in the temporary table matches the expected number of rows.
auditRows bool
configMap *types.DwhToTablesConfigMap
configMap *types.DestinationTableConfigMap
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed DwhToTablesConfigMap -> DestinationTableConfigMap

columns: columns.NewColumns(cols),
columnsToDelete: make(map[string]time.Time),
createTable: len(cols) == 0,
dropDeletedColumns: dropDeletedColumns,
}
}

// SetColumnsToDelete - This is used by tests only
func (d *DwhTableConfig) SetColumnsToDelete(cols map[string]time.Time) {
func (d *DestinationTableConfig) SetColumnsToDeleteForTest(cols map[string]time.Time) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed f(x)

if !isOk {
return nil
}

return tableConfig
}

func (d *DwhToTablesConfigMap) RemoveTableFromConfig(tableID sql.TableIdentifier) {
func (d *DestinationTableConfigMap) RemoveTable(tableID sql.TableIdentifier) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed f(x)

}

func (d *DwhToTablesConfigMap) AddTableToConfig(tableID sql.TableIdentifier, config *DwhTableConfig) {
func (d *DestinationTableConfigMap) AddTable(tableID sql.TableIdentifier, config *DestinationTableConfig) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed f(x)

sync.RWMutex
}

func (d *DwhToTablesConfigMap) TableConfigCache(tableID sql.TableIdentifier) *DwhTableConfig {
func (d *DestinationTableConfigMap) GetTableConfig(tableID sql.TableIdentifier) *DestinationTableConfig {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed f(x)

@@ -15,44 +15,44 @@ import (
"github.com/stretchr/testify/assert"
)

func generateDwhTableCfg() *types.DwhTableConfig {
func generateDwhTableCfg() *types.DestinationTableConfig {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to rename this function too? (nit)

@Tang8330 Tang8330 merged commit 672fdc6 into master Jan 29, 2025
3 checks passed
@Tang8330 Tang8330 deleted the rename-data-types branch January 29, 2025 21:16
stitch-marinus pushed a commit to Stitch-Money/transfer that referenced this pull request Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants