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

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

                Author: ASF GitHub Bot
            Created on: 21/May/18 17:51
            Start Date: 21/May/18 17:51
    Worklog Time Spent: 10m 
      Work Description: akedin commented on a change in pull request #5428: 
[BEAM-4167] Implement UNNEST
URL: https://github.com/apache/beam/pull/5428#discussion_r189654159
 
 

 ##########
 File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/interpreter/operator/BeamSqlPrimitive.java
 ##########
 @@ -111,54 +112,57 @@ public boolean accept() {
     }
 
     switch (outputType) {
-    case BIGINT:
-      return value instanceof Long;
-    case DECIMAL:
-      return value instanceof BigDecimal;
-    case DOUBLE:
-      return value instanceof Double;
-    case FLOAT:
-      return value instanceof Float;
-    case INTEGER:
-      return value instanceof Integer;
-    case SMALLINT:
-      return value instanceof Short;
-    case TINYINT:
-      return value instanceof Byte;
-    case BOOLEAN:
-      return value instanceof Boolean;
-    case CHAR:
-    case VARCHAR:
-      return value instanceof String || value instanceof NlsString;
-    case TIME:
-      return value instanceof ReadableInstant;
-    case TIMESTAMP:
-    case DATE:
-      return value instanceof ReadableInstant;
-    case INTERVAL_SECOND:
-    case INTERVAL_MINUTE:
-    case INTERVAL_HOUR:
-    case INTERVAL_DAY:
-    case INTERVAL_MONTH:
-    case INTERVAL_YEAR:
-      return value instanceof BigDecimal;
-    case SYMBOL:
-      // for SYMBOL, it supports anything...
-      return true;
-    case ARRAY:
-      return value instanceof List;
-    case MAP:
-      return value instanceof Map;
-    case ROW:
-      return value instanceof Row;
-    default:
-      throw new UnsupportedOperationException(
-          "Unsupported Beam SQL type in expression: " + outputType.name());
+      case BIGINT:
+        return value instanceof Long;
+      case DECIMAL:
+        return value instanceof BigDecimal;
+      case DOUBLE:
+        return value instanceof Double;
+      case FLOAT:
+        return value instanceof Float;
+      case INTEGER:
+        return value instanceof Integer;
+      case SMALLINT:
+        return value instanceof Short;
+      case TINYINT:
+        return value instanceof Byte;
+      case BOOLEAN:
+        return value instanceof Boolean;
+      case CHAR:
+      case VARCHAR:
+        return value instanceof String || value instanceof NlsString;
+      case TIME:
+        return value instanceof ReadableInstant;
+      case TIMESTAMP:
+      case DATE:
+        return value instanceof ReadableInstant;
+      case INTERVAL_SECOND:
+      case INTERVAL_MINUTE:
+      case INTERVAL_HOUR:
+      case INTERVAL_DAY:
+      case INTERVAL_MONTH:
+      case INTERVAL_YEAR:
+        return value instanceof BigDecimal;
+      case SYMBOL:
+        // for SYMBOL, it supports anything...
+        return true;
+      case ARRAY:
+        return value instanceof List;
+      case MAP:
+        return value instanceof Map;
+      case ROW:
+        return value instanceof Row;
+      case MULTISET:
+        return value instanceof Iterable;
 
 Review comment:
   this says that Multiset can be represented by any iterable, is this correct?

----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 104158)
    Time Spent: 1h  (was: 50m)

> Implement UNNEST
> ----------------
>
>                 Key: BEAM-4167
>                 URL: https://issues.apache.org/jira/browse/BEAM-4167
>             Project: Beam
>          Issue Type: New Feature
>          Components: dsl-sql
>            Reporter: Anton Kedin
>            Assignee: Kenneth Knowles
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> We need to be able to convert collections to relations in the query to 
> perform any meaningful operations on them. 



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

Reply via email to