You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2016/11/30 23:31:16 UTC
[kudu-CR] KUDU-1775 (part 2). Enforce a max number of columns and reasonable identifier lengths
Hello Dan Burkert, Matthew Jacobs, Will Berkeley, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/5290
to look at the new patch set (#2).
Change subject: KUDU-1775 (part 2). Enforce a max number of columns and reasonable identifier lengths
......................................................................
KUDU-1775 (part 2). Enforce a max number of columns and reasonable identifier lengths
* Disallows unreasonable identifiers such as empty strings or strings
longer than a configurable maximum size. I set the default max size to
256. MySQL[1] and PostgreSQL[2] seem to limit identifiers to 64
characters, and Oracle[3] seems to limit to 30. So 256 seemed like it
should be plenty. The flag is marked as unsafe but if anyone has a
compatibility issue on upgrade, the limit can be raised.
* Enforces a maximum number of columns, set here to 300 as a default.
Really wide tables are an anti-pattern, and although some initial
testing shows that we won't completely fail until a few thousand
columns, we probably want to put a guard rail up well before the
failure point.
Again, if users are depending on a higher number, this can be worked
around by raising the default through an unsafe flag.
[1] http://dev.mysql.com/doc/refman/5.7/en/identifiers.html
[2] https://www.postgresql.org/docs/9.1/static/sql-syntax-lexical.html
[3] http://stackoverflow.com/questions/18248318/change-table-column-index-names-size-in-oracle-11g-or-12c
Change-Id: I9cab30dd1ea78a160403c79442b08739ddc92f12
---
M src/kudu/client/client-test.cc
M src/kudu/master/catalog_manager.cc
2 files changed, 184 insertions(+), 37 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/90/5290/2
--
To view, visit http://gerrit.cloudera.org:8080/5290
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9cab30dd1ea78a160403c79442b08739ddc92f12
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>