You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by arunmahadevan <gi...@git.apache.org> on 2017/01/27 06:53:56 UTC

[GitHub] storm pull request #1899: STORM-2330: Fix storm sql code generation for UDAF...

GitHub user arunmahadevan opened a pull request:

    https://github.com/apache/storm/pull/1899

    STORM-2330: Fix storm sql code generation for UDAF with non standard sql types

    Storm-sql uses cacite's code generator. For UDAF with non standard return types, the generated code does not compile.
    
    E.g. For an UDAF that returns a List<T> cacite converts the return type to SQL type "OTHER" and finally inserts a cast to Object[] in the returned code which fails to compile with "java.lang.ClassCastException: java.util.ArrayList cannot be cast to [Ljava.lang.Object;"
    
    Use a custom type factory to return "ANY" as the type (instead of OTHER) if the java type cannot be mapped to a sql type.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/arunmahadevan/storm STORM-2330

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/storm/pull/1899.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1899
    
----
commit 1d09d786fdbf61f634441e76e2c2a53c35178540
Author: Arun Mahadevan <ar...@apache.org>
Date:   2017-01-27T06:49:18Z

    STORM-2330: Fix storm sql code generation for UDAF with non standard sql types
    
    Storm-sql uses cacite's code generator. For UDAF with non standard return types, the generated code does not compile.
    
    E.g. For an UDAF that returns a List<T> cacite converts the return type to SQL type "OTHER" and finally inserts a cast to Object[] in the returned code which fails to compile with "java.lang.ClassCastException: java.util.ArrayList cannot be cast to [Ljava.lang.Object;"
    
    Use a custom type factory to return "ANY" as the type (instead of OTHER) if the java type cannot be mapped to a sql type.

----


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

[GitHub] storm issue #1899: STORM-2330: Fix storm sql code generation for UDAF with n...

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the issue:

    https://github.com/apache/storm/pull/1899
  
    +1


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

[GitHub] storm pull request #1899: STORM-2330: Fix storm sql code generation for UDAF...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/storm/pull/1899


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