4d812aeda5ae9235f239a3a766f07c11b499606b,tools/hive-bigquery/hive_component.py,HiveComponent,get_table_location,#HiveComponent#Any#Any#,112
Before Change
cursor.execute("set hive.ddl.output.format=json")
cursor.execute("USE %s" % database_name)
cursor.execute("desc extended %s " % table_name)
results = json.loads(cursor.fetchall()[0][0])
location = results["tableInfo"]["sd"]["location"]
return location
After Change
str: Location of the Hive table
queries = ["set hive.ddl.output.format=json",
"desc extended %s.%s" % (database_name, table_name)]
results = self.execute_query(queries)
location = json.loads(results[0][0])["tableInfo"]["sd"]["location"]
return location
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: GoogleCloudPlatform/professional-services
Commit Name: 4d812aeda5ae9235f239a3a766f07c11b499606b
Time: 2019-01-03
Author: pkattamuri@google.com
File Name: tools/hive-bigquery/hive_component.py
Class Name: HiveComponent
Method Name: get_table_location
Project Name: allenai/allennlp
Commit Name: 0459261c388bec72937e0268c4316b85279d0bac
Time: 2018-09-24
Author: kl2806@columbia.edu
File Name: allennlp/semparse/contexts/sql_table_context.py
Class Name: SqlTableContext
Method Name: initialize_grammar_str
Project Name: probcomp/bayeslite
Commit Name: c0669961794c6d17e25d99f49594a42043979c9b
Time: 2017-02-04
Author: fsaad@mit.edu
File Name: tests/test_cgpm.py
Class Name:
Method Name: test_cgpm_no_empty_categories
Project Name: GoogleCloudPlatform/professional-services
Commit Name: 4d812aeda5ae9235f239a3a766f07c11b499606b
Time: 2019-01-03
Author: pkattamuri@google.com
File Name: tools/hive-bigquery/hive_component.py
Class Name: HiveComponent
Method Name: list_partitions