> On April 15, 2014, 5:31 p.m., Keuntae Park wrote: > > tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/CatalogUtil.java, > > lines 437-450 > > <https://reviews.apache.org/r/20264/diff/1/?file=555232#file555232line437> > > > > This part of code can be simplified as followings: > > > > if (paramDiff < 0) { > > return false; > > }
After I discussed Hyoungjun in offline, I'm fixing those parts. In my patch, this part was slightly refactored. The conditions you mentioned was simplified. > On April 15, 2014, 5:31 p.m., Keuntae Park wrote: > > tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/CatalogUtil.java, > > lines 545-548 > > <https://reviews.apache.org/r/20264/diff/1/?file=555232#file555232line545> > > > > Numeric and decimal is equivalent so that I think they are compatible > > to each other type. > > However, this code looks that NUMERIC type is not compatible to DECIMAL > > type. I removed DECIMAL type from catalog. We haven't used DECIMAL type even though it has been included in CatalogProtos. So, it does not affect any other parts. > On April 15, 2014, 5:31 p.m., Keuntae Park wrote: > > tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/CatalogUtil.java, > > lines 550-553 > > <https://reviews.apache.org/r/20264/diff/1/?file=555232#file555232line550> > > > > Is VARCHAR is compatible to NCHAR? > > VARCHAR cannot store Unicode while NCHAR can. > > Thank you for your detailed review and comment. You are right. We need to consider the compatibility between NCHAR and VARCHAR. BTW, I think that they are not a problem right now because we don't have any implementation for NCHAR and VARCHAR. Also, the character set of NCHAR and VARCHAR will depend on the implementations. For simplicity, we can use UTF-8 encoding for all character types. At that time, we should discuss them. Thanks, Hyunsik - Hyunsik ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/20264/#review40354 ----------------------------------------------------------- On April 12, 2014, 1:29 a.m., hyoungjun kim wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/20264/ > ----------------------------------------------------------- > > (Updated April 12, 2014, 1:29 a.m.) > > > Review request for Tajo. > > > Bugs: TAJO-746 > https://issues.apache.org/jira/browse/TAJO-746 > > > Repository: tajo > > > Description > ------- > > See title. > The next description is from the postgresql > document(http://www.postgresql.org/docs/9.1/static/functions-conditional.html). > > > {noformat} > COALESCE(value [, ...]) > {noformat} > The COALESCE function returns the first of its arguments that is not null. > Null is returned only if all arguments are null. It is often used to > substitute a default value for null values when data is retrieved for > display, for example: > {code:sql} > SELECT COALESCE(description, short_description, '(none)') ... > {code} > Like a CASE expression, COALESCE only evaluates the arguments that are needed > to determine the result; that is, arguments to the right of the first > non-null argument are not evaluated. This SQL-standard function provides > capabilities similar to NVL and IFNULL, which are used in some other database > systems. > > > Diffs > ----- > > > tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/CatalogUtil.java > 7555325 > > tajo-catalog/tajo-catalog-common/src/test/java/org/apache/tajo/catalog/TestCatalogUtil.java > 75149e9 > > tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/CatalogServer.java > b32b4e9 > > tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/builtin/Coalesce.java > PRE-CREATION > > tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/builtin/CoalesceDouble.java > PRE-CREATION > > tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/builtin/CoalesceLong.java > PRE-CREATION > > tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/builtin/CoalesceString.java > PRE-CREATION > > tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestBuiltinFunctionsExpr.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/20264/diff/ > > > Testing > ------- > > mvn clean install; > > > Thanks, > > hyoungjun kim > >
