[
https://issues.apache.org/jira/browse/BEAM-4461?focusedWorklogId=381938&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-381938
]
ASF GitHub Bot logged work on BEAM-4461:
----------------------------------------
Author: ASF GitHub Bot
Created on: 04/Feb/20 23:06
Start Date: 04/Feb/20 23:06
Worklog Time Spent: 10m
Work Description: TheNeuralBit commented on pull request #10766:
[BEAM-4461] Add Selected.flattenedSchema
URL: https://github.com/apache/beam/pull/10766#discussion_r374970128
##########
File path:
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/SelectHelpers.java
##########
@@ -344,4 +352,46 @@ private static void selectIntoRowWithQualifiers(
throw new RuntimeException("Unexpected type " + qualifier.getKind());
}
}
+
+ /**
+ * This is the default naming policy for naming fields. Every field name in
the path to a given
+ * field is concated with _ characters.
+ */
+ public static final SerializableFunction<List<String>, String>
CONCAT_FIELD_NAMES =
+ l -> {
+ return String.join("_", l);
+ };
+ /**
+ * This policy keeps the raw nested field name. If two differently-nested
fields have the same
+ * name, unnesting will fail with this policy.
+ */
Review comment:
Similar bike-shed: This mentions unnesting which isn't a thing after this
change, maybe change to flattening?
----------------------------------------------------------------
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: 381938)
Time Spent: 29h (was: 28h 50m)
> Create a library of useful transforms that use schemas
> ------------------------------------------------------
>
> Key: BEAM-4461
> URL: https://issues.apache.org/jira/browse/BEAM-4461
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-java-core
> Reporter: Reuven Lax
> Assignee: Reuven Lax
> Priority: Major
> Time Spent: 29h
> Remaining Estimate: 0h
>
> e.g. JoinBy(fields). Project, Filter, etc.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)