flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sunjincheng121 <...@git.apache.org>
Subject [GitHub] flink pull request #4536: [FLINK-7439] [table] Support variable arguments fo...
Date Mon, 28 Aug 2017 00:48:43 GMT
Github user sunjincheng121 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4536#discussion_r135426250
  
    --- Diff: flink-libraries/flink-table/src/test/java/org/apache/flink/table/runtime/utils/JavaUserDefinedTableFunctions.java
---
    @@ -35,4 +35,15 @@ public void eval(Integer a, Long b, Long c) {
     			collect(c);
     		}
     	}
    +
    +	/**
    +	 * Emit every input string.
    +	 */
    +	public static class JavaVarsArgTableFunc0 extends TableFunction<String> {
    +		public void eval(String... strs) {
    +			for (String s : strs) {
    +				collect(s);
    +			}
    +		}
    --- End diff --
    
    Add an other eval for method match check.(only a suggestion).
    {code}
    public void eval(int ival, String sVal) {
    			while (ival-- > 0) {
    				collect(sVal);
    			}
    		}
    {code}


---
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.
---

Mime
View raw message