vitess
vitess copied to clipboard
Feature Request: Move most VARBINARY columns to VARCHAR in examples
Feature Description
The Vitess local examples (source) are a common first touch experience for users. These users are regularly confused or curious as to why many of the columns in the examples show up as HEX in the query results. The reason for this is that we use VARBINARY types throughout — in some rare cases like keyspace_id it makes sense, but most like customer.email are pure text. This makes understanding what's happening and quickly confirming at-a-glance results as expected more difficult and poses a minor hurdle when it's already quite a lot to get started with Vitess.
We should move most of our VARBINARY usage under ./examples to VARCHAR. This offers a more intuitive/expected experience while also more closely matching what users will be using for similar types of data.
Note: if any of those columns are used in Vindexes then we may also need to change the type used.
Tasks:
- [ ] Change non-binary column types from
VARBINARYtoVARCHAR - [ ] Change the vindex type used for those columns in related vschema definitions from
hashtoxxhash - [ ] Get all of the example CI tests passing again
Use Case(s)
An easier on-ramp to Vitess.
I would like to work on this issue
Hey! I would be happy to raise a PR for this.
Anyone is welcome to open a PR. I don't want to assign it to anyone before there's a PR because history has shown that the assignee often doesn't end up opening a PR, nor do they unassign themselves, so others think someone is working on it when in reality nobody is. Then maintainers have to come back and unassign it after N months and around we go. 🙂
@mattlord May I work on this issue if this is still open ?
@mattlord May I work on this issue if this is still open ?
@anshikavashistha sure, nobody else is working on this AFAIK. If you open a preliminary PR then I'll assign it to you. Assigning things like this to people has historically caused more work for maintainers and potentially caused others not to work on it when in the end nothing happened. Thanks!
@mattlord May I work on this issue if this is still open ?
@anshikavashistha sure, nobody else is working on this AFAIK. If you open a preliminary PR then I'll assign it to you. Assigning things like this to people has historically caused more work for maintainers and potentially caused others not to work on it when in the end nothing happened. Thanks!
Sure @mattlord Thank you
@mattlord @deepthi ,I have to change VARBINARY columns to VARCHAR where appropriate or there might not be no need to move VARBINARY columns as per this relevant PR
The question is more for @mattlord. Given the change you made to the alias, many of the columns in the examples show up as HEX in the query results does not happen any more. Do we still want to change the data types?
As it turns out, none of the VARBINARY columns are being used as sharding columns, so it's not as if we are missing out on providing an example of how to shard using VARCHAR columns.
I think it's still worth doing as the type usage then aligns with what users would do, we move to xxhash, etc.
In that case, can you edit the issue description with the task list? Including moving from hash -> xxhash.
@mattlord Is there any more relevant info that needs to be mentioned in the issue description?
@anshikavashistha I don't think so. I did add a task list — hopefully that makes sense.