tajo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaewoong Jung <jun...@gmail.com>
Subject Re: A couple of questions about JSON query support
Date Fri, 14 Nov 2014 07:52:24 GMT
On Thu, Nov 13, 2014 at 11:39 PM, Jihoon Son <ghoonson@gmail.com> wrote:
> Hi Jaewoong,
> thanks for your interest.
> Here are my answers.
>
> 1. You are right. We should make TajoCli support only SQL, and create a new
> client for JSON.
> 2. Can you tell me what kinds of changes you made? In most cases, you can
> see the effect of your changes immediately, except when you modify the
> protocol buffers codes.

It was a really simple change like this.

* From
127:      String opType =
jsonObject.get(SERIALIZED_NAME_OF_OP_TYPE).getAsString();

* To
127:      JsonElement opTypeElement =
jsonObject.get(SERIALIZED_NAME_OF_OP_TYPE);
128:      if (opTypeElement == null) {
129:        throw new JsonParseException("Missing required field: " +
SERIALIZED_NAME_OF_OP_TYPE);
130:      }
131:      String opType = opTypeElement.getAsString();

FYI, I was trying to fix a bug where tsql just shows a dumb error
message, "ERROR: java.lang.NullPointerException" when an OpType field
is missing.

No matter how I change the code, it throws a NullPointerException from
the same line of the code. I even tried adding a few blank lines above
127, but the error trace shows that a NullPointerException was thrown
from the same line all the time.

Strangely enough, if I make a typo to see whether my change gets
compiled, mvn stops with a proper error message. :(

>
> Thanks,
> Jihoon
>
> 2014-11-14 16:13 GMT+09:00 Jaewoong Jung <jungjw@gmail.com>:
>
>> 1. I found this issue (https://issues.apache.org/jira/browse/TAJO-826)
>> which has a comment that we should remove all JSON related part from
>> TajoCli. Does it mean that we want to make tsql support SQL queries
>> only and create a separate client dedicated for JSON queries?
>>
>> 2. While trying to fix a minor bug in JSON parsing, I found that any
>> of changes I made to Expr.java had no effect on tsql behavior. Does it
>> read a pre-compiled jar file from somewhere else? What should I do to
>> test my Expr changes?
>>
>> Thanks,
>> Jaewoong
>>
>
>
>
> --
> Jihoon Son
>
> Database & Information Systems Group,
> Prof. Yon Dohn Chung Lab.
> Dept. of Computer Science & Engineering,
> Korea University
> 1, 5-ga, Anam-dong, Seongbuk-gu,
> Seoul, 136-713, Republic of Korea
>
> Tel : +82-2-3290-3580
> E-mail : jihoonson@korea.ac.kr

Mime
View raw message