[ https://issues.apache.org/jira/browse/HIVE-24217?focusedWorklogId=498624&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-498624 ]
ASF GitHub Bot logged work on HIVE-24217: ----------------------------------------- Author: ASF GitHub Bot Created on: 09/Oct/20 15:33 Start Date: 09/Oct/20 15:33 Worklog Time Spent: 10m Work Description: kgyrtkirk commented on a change in pull request #1542: URL: https://github.com/apache/hive/pull/1542#discussion_r502512642 ########## File path: standalone-metastore/metastore-server/src/main/resources/package.jdo ########## @@ -1549,6 +1549,83 @@ <column name="RM_DUMP_EXECUTION_ID"/> </index> </class> + + <class name="MStoredProc" table="STORED_PROCS" identity-type="datastore" detachable="true"> + <datastore-identity> + <column name="SP_ID"/> + </datastore-identity> + <field name="createTime"> + <column name="CREATE_TIME" jdbc-type="integer" allows-null="false"/> + </field> + <field name="lastAccessTime"> + <column name="LAST_ACCESS_TIME" jdbc-type="integer" allows-null="false"/> + </field> + <field name="database"> + <column name="DB_ID" allows-null="false"/> + </field> + <field name="name"> + <column name="NAME" length="256" jdbc-type="VARCHAR" allows-null="false"/> + </field> + <field name="owner"> + <column name="OWNER_NAME" length="128" jdbc-type="VARCHAR" allows-null="false"/> + </field> + <field name="source"> + <column name="SOURCE" jdbc-type="MEDIUMTEXT" allows-null="false"/> + </field> + <field name="language"> + <column name="LANG" jdbc-type="varchar" length="128" allows-null="false"/> + </field> + <field name="returnType"> + <column name="RET_TYPE" jdbc-type="varchar" length="128" allows-null="true"/> + </field> + <field name="parameters" table="SP_POS_ARGS" > + <collection element-type="MPosParam"/> + <join> + <column name="SP_ID"/> + </join> + <element> + <embedded> + <field name="name"> + <column name="NAME" jdbc-type="varchar" length="256" allows-null="false"/> + </field> + <field name="type"> + <column name="TYPE" jdbc-type="varchar" length="128" allows-null="false"/> + </field> + <field name="length"> + <column name="length" jdbc-type="integer" allows-null="true"/> + </field> + <field name="scale"> + <column name="scale" jdbc-type="integer" allows-null="true"/> + </field> + <field name="isOut"> + <column name="OUT" allows-null="false"/> + </field> + </embedded> + </element> + </field> Review comment: > I'm not sure if they never participate in a query. If one wants to discover the stored procedures which are currently stored in a DB and find out on what data they operate they would need to do some clumsy string manipulations on the signature. I believe you are thinking about `information_schema` stuff - its not set in stone that we have to get all that data from the metastore db - for this case we might add a few UDFs parameter info into an array or something ; so we will still store simple things in the metastore - but we could transform it into more readable in. > Considering that other DB engines also store these information separately I would like to keep it as it is for now and see how it works in practice. Later on when we have multi language support we can revisit this issue. yes it might be..but it would be better to revisit stuff like this if its really needed; and not after we have introduced "something" which later we should care for even if we don't want to I still think there will be no real benefit of "storing it" in a decomposed manner - it will be harder to go forward in case stuff changes - and right now will not use it for anything ; so let's remove it..and add it only if there is a real need for it. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 498624) Time Spent: 1h 40m (was: 1.5h) > HMS storage backend for HPL/SQL stored procedures > ------------------------------------------------- > > Key: HIVE-24217 > URL: https://issues.apache.org/jira/browse/HIVE-24217 > Project: Hive > Issue Type: Bug > Components: Hive, hpl/sql, Metastore > Reporter: Attila Magyar > Assignee: Attila Magyar > Priority: Major > Labels: pull-request-available > Attachments: HPL_SQL storedproc HMS storage.pdf > > Time Spent: 1h 40m > Remaining Estimate: 0h > > HPL/SQL procedures are currently stored in text files. The goal of this Jira > is to implement a Metastore backend for storing and loading these procedures. > This is an incremental step towards having fully capable stored procedures in > Hive. > > See the attached design for more information. -- This message was sent by Atlassian Jira (v8.3.4#803005)