Github user twdsilva commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/93#discussion_r35392010
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/schema/json/PhoenixJson.java ---
    @@ -231,4 +236,197 @@ private PhoenixJson getPhoenixJsonInternal(String[] 
paths) {
             }
             return new PhoenixJson(node, node.toString());
         }
    +
    +    /**
    +     * If the current {@link PhoenixJson} is a JsonArray,then it returns 
the length of the JsonArray.
    +     * <p>For example:[1,2,3] ,it will return 3
    +     * <p>Its required for json_array_length().
    +     * @throws SQLException
    +     */
    +    public int getJsonArrayLength() throws SQLException {
    +       if(this.rootNode.isArray()){
    +           return this.rootNode.size();
    +       }else{
    +           throw new SQLException("The JsonNode should be an Array");
    --- End diff --
    
    Add a new SQLExceptionCode and use SQLExceptionInfo.Builder


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to