You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hawq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/05/02 22:40:12 UTC
[jira] [Commented] (HAWQ-703) Serialize HCatalog Complex Types to
plain text (as Hive profile)
[ https://issues.apache.org/jira/browse/HAWQ-703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15267465#comment-15267465 ]
ASF GitHub Bot commented on HAWQ-703:
-------------------------------------
Github user shivzone commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/633#discussion_r61800082
--- Diff: pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/Metadata.java ---
@@ -67,36 +68,43 @@ public String toString() {
}
/**
- * Class representing item field - name and type.
+ * Class representing item field - name, type, source type, modifiers.
+ * Type - exposed type of field
+ * Source type - type of field in underlying source
+ * Modifiers - additional attributes which describe type or field
*/
public static class Field {
private String name;
- private String type; // TODO: change to enum
+ private EnumHawqType type; // field type which PXF exposes
+ private String sourceType; // filed type PXF reads from
private String[] modifiers; // type modifiers, optional field
- public Field(String name, String type) {
-
- if (StringUtils.isBlank(name) || StringUtils.isBlank(type)) {
- throw new IllegalArgumentException("Field name and type cannot be empty");
- }
-
- this.name = name;
- this.type = type;
+ public Field(String name, EnumHawqType type, String sourceType) {
--- End diff --
Correct indentation in Field class
> Serialize HCatalog Complex Types to plain text (as Hive profile)
> ----------------------------------------------------------------
>
> Key: HAWQ-703
> URL: https://issues.apache.org/jira/browse/HAWQ-703
> Project: Apache HAWQ
> Issue Type: New Feature
> Components: Hcatalog, PXF
> Reporter: Oleksandr Diachenko
> Assignee: Oleksandr Diachenko
>
> As for now user is able to create external HAWQ table on top of Hive table with complex types(LIST, MAP, STRUCT, UNION) and those types are being serialized as TEXT.
> But if user uses HCatalog integration feature and queries Hive tables having compex type columns through HAWQ he/she gets error.
> The goal is to serialize complex types to text when using HCatalog integration.
> Changes required:
> - PXF:
> -- add sourceType field to getMetadata endpoint.
> - HAWQ:
> -- master:
> --- update stored procedure pxf_get_item_fields, add sourceType field to responce.
> -- psql:
> --- update describe logic for Hive tables to show sourceType column in \d(\d+)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)