[ https://issues.apache.org/jira/browse/HAWQ-703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15269890#comment-15269890 ]
ASF GitHub Bot commented on HAWQ-703: ------------------------------------- Github user sansanichfb commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/633#discussion_r61976525 --- Diff: pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/utilities/EnumHawqType.java --- @@ -0,0 +1,105 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.hawq.pxf.api.utilities; + +import java.io.IOException; +import org.codehaus.jackson.JsonGenerator; +import org.codehaus.jackson.map.JsonSerializer; +import org.codehaus.jackson.map.annotate.JsonSerialize; +import org.codehaus.jackson.map.SerializerProvider; +import org.codehaus.jackson.JsonProcessingException; + +class EnumHawqTypeSerializer extends JsonSerializer<EnumHawqType> { + + @Override + public void serialize(EnumHawqType value, JsonGenerator generator, + SerializerProvider provider) throws IOException, + JsonProcessingException { + generator.writeString(value.getTypeName()); --- End diff -- Enum instances are not storing actual modifiers, just number and type of modifiers. > 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)