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 2022/05/12 21:53:32 UTC
[GitHub] [beam] ihji commented on a diff in pull request #17608: [BEAM-14430] Adding a logical type support for Python callables to Row schema
ihji commented on code in PR #17608:
URL: https://github.com/apache/beam/pull/17608#discussion_r871838227
##########
sdks/java/extensions/python/src/main/java/org/apache/beam/sdk/extensions/python/PythonExternalTransform.java:
##########
@@ -179,16 +204,20 @@ Row buildOrGetKwargsRow() {
// Types that are not one of following are considered custom types.
// * Java primitives
// * Type String
+ // * Type PythonCallableSource
+ // * Any Type explicitly annotated by withTypeHint()
// * Type Row
- private static boolean isCustomType(java.lang.Class<?> type) {
+ private boolean isCustomType(java.lang.Class<?> type) {
boolean val =
!(ClassUtils.isPrimitiveOrWrapper(type)
|| type == String.class
+ || type == PythonCallableSource.class
Review Comment:
I think it's not possible. Currently, there's no way to automatically map a language type to a representation type in Java SDK. We need additional implementation for it.
##########
model/pipeline/src/main/proto/org/apache/beam/model/pipeline/v1/beam_runner_api.proto:
##########
@@ -1094,6 +1094,13 @@ message StandardCoders {
}
}
+message LogicalTypes {
Review Comment:
Done.
--
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.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org