[ 
https://issues.apache.org/jira/browse/BEAM-5103?focusedWorklogId=133315&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-133315
 ]

ASF GitHub Bot logged work on BEAM-5103:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Aug/18 21:45
            Start Date: 09/Aug/18 21:45
    Worklog Time Spent: 10m 
      Work Description: akedin commented on a change in pull request #6175: 
[BEAM-5103][SQL]test aggregation functions at DSL level
URL: https://github.com/apache/beam/pull/6175#discussion_r209088713
 
 

 ##########
 File path: 
sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/integrationtest/BeamSqlBuiltinFunctionsIntegrationTestBase.java
 ##########
 @@ -152,12 +215,14 @@ private static ExpressionTestCase of(
     private transient List<ExpressionTestCase> exps = new ArrayList<>();
 
     public ExpressionChecker addExpr(String expression, Object expectedValue) {
-      // Because of erasure, we can only automatically infer non-parameterized 
types
       TypeName resultTypeName = 
JAVA_CLASS_TO_TYPENAME.get(expectedValue.getClass());
       checkArgument(
           resultTypeName != null,
-          "Could not infer a Beam type for %s."
-              + " Parameterized types must be provided explicitly.");
+          String.format(
+              "The type of the expected object '%s' is unknown in 
'addExpr(String %s, Object %s)'"
 
 Review comment:
   this `addExpr` example can be confusing now, e.g. if you call this method 
with something like `addExpr("++b ", Arrays.<MyObj> toList(myObj1, ...)`, then 
the error message would be something like `addExpr(String ++b, Object 
[com.blah.myObj@af213])` which looks bad. I'd rather just leave the parameter 
names.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 133315)
    Time Spent: 4.5h  (was: 4h 20m)

> Test aggregation functions at DSL levels
> ----------------------------------------
>
>                 Key: BEAM-5103
>                 URL: https://issues.apache.org/jira/browse/BEAM-5103
>             Project: Beam
>          Issue Type: Sub-task
>          Components: dsl-sql
>            Reporter: Rui Wang
>            Assignee: Rui Wang
>            Priority: Major
>          Time Spent: 4.5h
>  Remaining Estimate: 0h
>
> Typical aggregation functions include COUNT, SUM, MAX, MIN, etc.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to