vitess icon indicating copy to clipboard operation
vitess copied to clipboard

Feature Request: Move most VARBINARY columns to VARCHAR in examples

Open mattlord opened this issue 1 year ago • 12 comments
trafficstars

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 VARBINARY to VARCHAR
  • [ ] Change the vindex type used for those columns in related vschema definitions from hash to xxhash
  • [ ] Get all of the example CI tests passing again

Use Case(s)

An easier on-ramp to Vitess.

mattlord avatar May 22 '24 23:05 mattlord

I would like to work on this issue

EraKin575 avatar Jun 15 '24 20:06 EraKin575

Hey! I would be happy to raise a PR for this.

lata-11 avatar Jul 08 '24 17:07 lata-11

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 avatar Jul 08 '24 20:07 mattlord

@mattlord May I work on this issue if this is still open ?

anshikavashistha avatar Aug 27 '24 07:08 anshikavashistha

@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 avatar Aug 27 '24 14:08 mattlord

@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

anshikavashistha avatar Aug 27 '24 14:08 anshikavashistha

image @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

anshikavashistha avatar Aug 31 '24 09:08 anshikavashistha

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.

deepthi avatar Sep 03 '24 18:09 deepthi

I think it's still worth doing as the type usage then aligns with what users would do, we move to xxhash, etc.

mattlord avatar Sep 04 '24 14:09 mattlord

In that case, can you edit the issue description with the task list? Including moving from hash -> xxhash.

deepthi avatar Sep 04 '24 19:09 deepthi

@mattlord Is there any more relevant info that needs to be mentioned in the issue description?

anshikavashistha avatar Sep 11 '24 10:09 anshikavashistha

@anshikavashistha I don't think so. I did add a task list — hopefully that makes sense.

mattlord avatar Sep 11 '24 17:09 mattlord