Skip to content

Conversation

@FBruzzesi
Copy link
Member

What type of PR is this? (check all applicable)

  • 💾 Refactor
  • ✨ Feature
  • 🐛 Bug Fix
  • 🔧 Optimization
  • 📝 Documentation
  • ✅ Test
  • 🐳 Other

Related issues

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

If you have comments or can explain your changes, please do so below

Added explicit prefix only on lazy backends operations since these are the ones that a user might be able to investigate in various way. Not really applicable in the eager case

@FBruzzesi FBruzzesi added the enhancement New feature or request label Sep 20, 2025
@FBruzzesi FBruzzesi changed the title feat: Add prefix argument to generate_temporary_column_name feat: Add prefix argument to generate_temporary_column_name Sep 20, 2025
Comment on lines -1276 to +1284
# Prepend `'nw'` to ensure it always starts with a character
# https://github.com/narwhals-dev/narwhals/issues/2510
token = f"nw{token_hex(n_bytes - 1)}"
token = f"{prefix}{token_hex(n_bytes - 1)}"
Copy link
Member Author

Choose a reason for hiding this comment

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

Should we ensure that prefix is not an empty string?

Copy link
Member

Choose a reason for hiding this comment

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

naah

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

thanks @FBruzzesi !

Comment on lines -1276 to +1284
# Prepend `'nw'` to ensure it always starts with a character
# https://github.com/narwhals-dev/narwhals/issues/2510
token = f"nw{token_hex(n_bytes - 1)}"
token = f"{prefix}{token_hex(n_bytes - 1)}"
Copy link
Member

Choose a reason for hiding this comment

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

naah

dangotbanned added a commit that referenced this pull request Sep 30, 2025
Still need to do `temp.column_names` as well
That one is quite different to #3147, but was needed in this PR
@FBruzzesi FBruzzesi merged commit 321abde into main Oct 2, 2025
31 of 33 checks passed
@FBruzzesi FBruzzesi deleted the feat/add-prefix-in-generate-temp-column branch October 2, 2025 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

enh: readable temporary column names

3 participants