phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JamesRTaylor <>
Subject [GitHub] phoenix pull request #275: PHOENIX-4237: Add function to calculate Java coll...
Date Thu, 12 Oct 2017 21:36:12 GMT
Github user JamesRTaylor commented on a diff in the pull request:
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/expression/function/
    @@ -0,0 +1,233 @@
    +package org.apache.phoenix.expression.function;
    +import java.sql.SQLException;
    +import java.text.Collator;
    +import java.util.Arrays;
    +import java.util.List;
    +import java.util.Locale;
    +import org.apache.commons.lang.BooleanUtils;
    +import org.apache.commons.logging.Log;
    +import org.apache.commons.logging.LogFactory;
    +import org.apache.phoenix.expression.Expression;
    +import org.apache.phoenix.parse.FunctionParseNode;
    +import org.apache.phoenix.schema.tuple.Tuple;
    +import org.apache.phoenix.schema.types.PBoolean;
    +import org.apache.phoenix.schema.types.PDataType;
    +import org.apache.phoenix.schema.types.PInteger;
    +import org.apache.phoenix.schema.types.PIntegerArray;
    +import org.apache.phoenix.schema.types.PUnsignedIntArray;
    +import org.apache.phoenix.schema.types.PVarbinary;
    +import org.apache.phoenix.schema.types.PVarchar;
    +import org.apache.phoenix.schema.types.PhoenixArray;
    +import com.force.db.i18n.LinguisticSort;
    +import com.force.i18n.LocaleUtils;
    + * A Phoenix Function that calculates a collation key for an input string based
    + * on a caller-provided locale and collator strength and decomposition settings.
    + * 
    + * It uses the open-source grammaticus and i18n packages to obtain the collators
    + * it needs.
    --- End diff --
    We should include more comments here. In particular, what sort order will we get? Does
this mimic some other databases behavior (i.e. Oracle)? Does it deviate from that at all?
Does Oracle follow some standard that we could point to?
    Also, please make sure to budget time to update our online reference manual:
This lives in phoenix.csv in our SVN repo as described here:


View raw message