[
https://issues.apache.org/jira/browse/BEAM-10633?focusedWorklogId=468920&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-468920
]
ASF GitHub Bot logged work on BEAM-10633:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 10/Aug/20 22:40
Start Date: 10/Aug/20 22:40
Worklog Time Spent: 10m
Work Description: TheNeuralBit commented on a change in pull request
#12520:
URL: https://github.com/apache/beam/pull/12520#discussion_r468225048
##########
File path:
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/AutoValueUtils.java
##########
@@ -139,11 +139,15 @@ private static boolean matchConstructor(
Collectors.toMap(
f ->
ReflectUtils.stripGetterPrefix(f.getMethod().getName()),
Function.identity()));
- for (FieldValueTypeInformation type : getterTypes) {
- if (typeMap.get(type.getName()) == null) {
+
+ // Verify that constructor parameters match (name and type) the inferred
schema.
+ for (Parameter parameter : constructor.getParameters()) {
+ FieldValueTypeInformation type =
typeMap.getOrDefault(parameter.getName(), null);
+ if (type == null || type.getRawType() != parameter.getType()) {
Review comment:
I'm not quite sure what the old logic was trying to verify. Now this
verifies that every constructor parameter corresponds to a schema field.
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 468920)
Time Spent: 2.5h (was: 2h 20m)
> UdfImpl when returns java.util.List will hit a NPE
> --------------------------------------------------
>
> Key: BEAM-10633
> URL: https://issues.apache.org/jira/browse/BEAM-10633
> Project: Beam
> Issue Type: Improvement
> Components: dsl-sql
> Reporter: Rui Wang
> Assignee: Rui Wang
> Priority: P2
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)