Question. Is there a official set of legal charact...
# pinot-dev
j
Question. Is there a official set of legal characters and restrictions (i.e. length, can't begin with certain characters) for the table column name? We are trying to encode arbitrary data into the table column name and want to ensure we escaped all illegal characters and work around the restrictions.
x
cc: @Rong R
r
we mostly follow postgresql standard in naming convention. Although there are still some gaps, but following it should be the most compatible going forward (see: https://www.postgresql.org/docs/15/ddl-schemas.html)
j
Do we have 59 character limit for table column name as well in Pinot?
r
I don't think so. Did you encounter something like that?
j
Not yet, but we want to protect ourself from it. I.e. for our use-case, we may run into table column name that is >1000 characters. If there's a limit, we'll need to avoid those table names and handle them gracefully.
Right now, we do the following string replacement in the generated table names:
Copy code
{
  ":": "colon",
  "?": "question",
  " ": "space",
  "$": "dollar",
  "&": "ampersand",
  "^": "circumflex",
  "`": "backtick",
  "\"": "double-quote",
  "'": "single-quote"
}
It's non-exhaustive, so if we encounter characters which crashes Pinot, we'll add them to the list. We haven't handled the length issue yet, so that's why I am asking for the max length now.
r
i am not sure there's a limit on query per se. but normal operational standpoint please do not create columns with that long of a name --> many stats and zookeeper / server "manager" classes will be affected
j
Got it. We'll keep a reasonable cap. Most of our column names (auto-generated based on the data itself, essentially flattened JSON keys), should be less than 100 characters long.
👍 1