[ https://issues.apache.org/jira/browse/HIVE-17981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16282267#comment-16282267 ]
ASF GitHub Bot commented on HIVE-17981: --------------------------------------- GitHub user alanfgates opened a pull request: https://github.com/apache/hive/pull/274 HIVE-17981 Create a set of builders for Thrift classes You can merge this pull request into a Git repository by running: $ git pull https://github.com/alanfgates/hive hive17981 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/hive/pull/274.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #274 ---- commit 5360d684f12444bbaa846c80bdf972ca1748e875 Author: Alan Gates <ga...@hortonworks.com> Date: 2017-09-12T20:18:09Z HIVE-17981 Create a set of builders for Thrift classes ---- > Create a set of builders for Thrift classes > ------------------------------------------- > > Key: HIVE-17981 > URL: https://issues.apache.org/jira/browse/HIVE-17981 > Project: Hive > Issue Type: Sub-task > Components: Standalone Metastore > Reporter: Alan Gates > Assignee: Alan Gates > Labels: pull-request-available > Attachments: HIVE-17981.patch > > > Instantiating some of the Thrift classes is painful. Consider building a > {{Table}} object, which requires a {{StorageDescriptor}}, which requires a > {{SerDeInfo}} and a list of {{FieldInfo}}. All that is really necessary for > a Table in the most simple case is a name, a database, and some columns. But > currently creating even a simple Table requires 20+ lines of code. This is > particularly painful in tests. > I propose to add a set of builders. These will come with reasonable defaults > to minimize the boilerplate code. They will also include simple methods for > common operations (like adding columns, or a parameter) without requiring the > user to create all the sub-objects (like {{StorageDescriptor}}). -- This message was sent by Atlassian JIRA (v6.4.14#64029)