You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/06/02 18:26:16 UTC

[GitHub] [beam] amaliujia commented on a change in pull request #11895: [Beam 9879] Null String Not Encoded

amaliujia commented on a change in pull request #11895:
URL: https://github.com/apache/beam/pull/11895#discussion_r434081404



##########
File path: sdks/java/extensions/sql/zetasql/src/test/java/org/apache/beam/sdk/extensions/sql/zetasql/ZetaSQLDialectSpecTest.java
##########
@@ -3130,6 +3130,23 @@ public void testUnnestArrayColumn() {
     pipeline.run().waitUntilFinish(Duration.standardMinutes(PIPELINE_EXECUTION_WAITTIME_MINUTES));
   }
 
+  @Test
+  public void testStringAggregation() {
+    String sql =
+        "SELECT STRING_AGG(fruit) AS string_agg"
+            + " FROM UNNEST([\"apple\", \"pear\", NULL, \"banana\", \"pear\"]) AS fruit";

Review comment:
       In fact, I think it was a decision to not handle NULL in string coder. 
   
   So the easiest way to move forward is to not include `NULL` in your test case, and leave a comment to say that `STRING_AGG` does not handle `NULL` value




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org