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

ASF GitHub Bot commented on TAJO-1465:
--------------------------------------

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

    https://github.com/apache/tajo/pull/652#discussion_r39255382
  
    --- Diff: tajo-common/src/main/java/org/apache/tajo/datum/DatumFactory.java 
---
    @@ -107,53 +107,50 @@ public static Datum createFromString(DataType 
dataType, String value) {
         case INET4:
           return createInet4(value);
         default:
    -      throw new UnsupportedOperationException(dataType.toString());
    +      throw new 
TajoRuntimeException(Errors.ResultCode.UNSUPPORTED_DATATYPE, 
dataType.toString());
         }
       }
     
       public static Datum createFromBytes(DataType dataType, byte[] bytes) {
         switch (dataType.getType()) {
     
    -    case BOOLEAN:
    -      return createBool(bytes[0]);
    -    case INT2:
    -      return createInt2(NumberUtil.toShort(bytes));
    -    case INT4:
    -      return createInt4(NumberUtil.toInt(bytes));
    -    case INT8:
    -      return createInt8(NumberUtil.toLong(bytes));
    -    case FLOAT4:
    -      return createFloat4(NumberUtil.toFloat(bytes));
    -    case FLOAT8:
    -      return createFloat8(NumberUtil.toDouble(bytes));
    -    case CHAR:
    -      return createChar(bytes);
    -    case TEXT:
    -      return createText(bytes);
    -    case DATE:
    -      return new DateDatum(NumberUtil.toInt(bytes));
    -    case TIME:
    -      return new TimeDatum(NumberUtil.toLong(bytes));
    -    case TIMESTAMP:
    -      return new TimestampDatum(NumberUtil.toLong(bytes));
    -    case BIT:
    -      return createBit(bytes[0]);
    -    case BLOB:
    -      return createBlob(bytes);
    -    case INET4:
    -      return createInet4(bytes);
    -    case PROTOBUF:
    -      ProtobufDatumFactory factory = ProtobufDatumFactory.get(dataType);
    -      Message.Builder builder = factory.newBuilder();
    -      try {
    -        builder.mergeFrom(bytes);
    -        return factory.createDatum(builder.build());
    -      } catch (IOException e) {
    -        e.printStackTrace();
    -        throw new RuntimeException(e);
    -      }
    -    default:
    -        throw new UnsupportedOperationException(dataType.toString());
    +      case BOOLEAN:
    --- End diff --
    
    SWITCH and CASE should be in the same column position.


> Add ORCFileAppender to write into ORCFile table
> -----------------------------------------------
>
>                 Key: TAJO-1465
>                 URL: https://issues.apache.org/jira/browse/TAJO-1465
>             Project: Tajo
>          Issue Type: Sub-task
>          Components: Storage
>    Affects Versions: 0.10.0
>            Reporter: Dongjoon Hyun
>            Assignee: Jongyoung Park
>              Labels: orc
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to