phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JamesRTaylor <...@git.apache.org>
Subject [GitHub] phoenix pull request #275: PHOENIX-4237: Add function to calculate Java coll...
Date Thu, 12 Oct 2017 21:33:32 GMT
Github user JamesRTaylor commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/275#discussion_r144415724
  
    --- Diff: phoenix-core/src/test/java/org/apache/phoenix/expression/function/CollationKeyFunctionTest.java
---
    @@ -0,0 +1,134 @@
    +package org.apache.phoenix.expression.function;
    +
    +import static org.junit.Assert.assertEquals;
    +import static org.junit.Assert.fail;
    +
    +import java.sql.SQLException;
    +import java.util.List;
    +
    +import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
    +import org.apache.phoenix.expression.function.CollationKeyFunction;
    +import org.apache.phoenix.schema.SortOrder;
    +import org.apache.phoenix.schema.types.PBoolean;
    +import org.apache.phoenix.schema.types.PInteger;
    +import org.apache.phoenix.schema.types.PVarchar;
    +import org.apache.phoenix.schema.types.PhoenixArray;
    +
    +import org.apache.phoenix.expression.Expression;
    +import org.apache.phoenix.expression.LiteralExpression;
    +
    +import org.junit.Test;
    +
    +import com.google.common.collect.Lists;
    +
    +/**
    + * "Unit" tests for CollationKeyFunction
    + * 
    + * @author snakhoda
    + *
    + */
    +public class CollationKeyFunctionTest {
    --- End diff --
    
    We'll need more tests. You really want to test the sort order of a list of strings matches
the expected linguistic sort order. These tests don't have a lot of meaning in terms of validating
the sort order is correct IMHO.
    
    We'll also want end2end tests that use the new function.


---

Mime
View raw message