Github user jihoonson commented on the pull request:
https://github.com/apache/tajo/pull/993#issuecomment-211822913
Hi @jinossy, thanks for work. This is a really critical bug.
Your patch looks good, but I found some issues.
* Please disable the addition and subtraction of ```date``` and ```float```
types. Even though you didn't change this part, but it should be not allowed.
* The addition and subtraction of ```time``` and ```timestamp``` should be
allowed. Please see the below.
```
default> \d test
table name: default.test
table uri: hdfs://localhost:7020/tajo/warehouse/default/test
store type: TEXT
number of rows: 1
volume: 29 B
Options:
'timezone'='Asia/Seoul'
'text.delimiter'='|'
schema:
t TIME
ts TIMESTAMP
default> select t + ts from test;
ERROR: operator does not exist: 'default.test.t (TIME) + default.test.ts
(TIMESTAMP)'
```
* The below error message looks not appropriate.
```
default> select '1990-01-01'::date + '1990-01-01 00:10:10'::timestamp;
ERROR: internal error: Cannot compare to TIMESTAMP type datum
```
* The following cases should not be allowed.
```
default> select '00:10:10'::timestamp;
?cast
-------------------------------
0002-11-30 00:10:10 BC
default> select '00:10:10'::date;
?cast
-------------------------------
0002-11-30
(1 rows, 0.003 sec, 0 B selected)
default> select '1992-01-01'::time;
?cast
-------------------------------
1992:01:01
(1 rows, 0.003 sec, 0 B selected)
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---