sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SQOOP-3396) Add parquet numeric support for Parquet in Hive import
Date Tue, 04 Dec 2018 14:51:00 GMT

    [ https://issues.apache.org/jira/browse/SQOOP-3396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16708801#comment-16708801
] 

ASF GitHub Bot commented on SQOOP-3396:
---------------------------------------

Github user fszabo2 commented on a diff in the pull request:

    https://github.com/apache/sqoop/pull/60#discussion_r238693021
  
    --- Diff: src/java/org/apache/sqoop/hive/HiveTypes.java ---
    @@ -79,8 +85,42 @@ public static String toHiveType(int sqlType) {
               default:
             // TODO(aaron): Support BINARY, VARBINARY, LONGVARBINARY, DISTINCT,
             // BLOB, ARRAY, STRUCT, REF, JAVA_OBJECT.
    -        return null;
    +            return null;
    +      }
    +  }
    +
    +  private static String mapDecimalsToHiveType(int sqlType, SqoopOptions options) {
    +    if (options.getConf().getBoolean(ConfigurationConstants.PROP_ENABLE_PARQUET_LOGICAL_TYPE_DECIMAL,
false)
    +        && (sqlType == Types.NUMERIC || sqlType == Types.DECIMAL)){
    +      return HIVE_TYPE_DECIMAL;
    +    }
    +    return HIVE_TYPE_DOUBLE;
    +  }
    +
    +
    +  public static String toHiveType(Schema schema) {
    +    if (schema.getType() == Schema.Type.UNION) {
    +      for (Schema subSchema : schema.getTypes()) {
    +        if (subSchema.getLogicalType() != null && subSchema.getLogicalType()
instanceof Decimal) {
    --- End diff --
    
    I learn something new every day :), removed.


> Add parquet numeric support for Parquet in Hive import
> ------------------------------------------------------
>
>                 Key: SQOOP-3396
>                 URL: https://issues.apache.org/jira/browse/SQOOP-3396
>             Project: Sqoop
>          Issue Type: Sub-task
>            Reporter: Fero Szabo
>            Assignee: Fero Szabo
>            Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message