You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "hanyuzheng7 (via GitHub)" <gi...@apache.org> on 2023/08/05 00:50:36 UTC
[GitHub] [flink] hanyuzheng7 opened a new pull request, #23098: [BP][FLINK-32262] Add MAP_ENTRIES support
hanyuzheng7 opened a new pull request, #23098:
URL: https://github.com/apache/flink/pull/23098
## What is the purpose of the change
This is an implementation of MAP_ENTRIES in apache:release-1.17
Implement the map_entries method to transform a map into an array of key-value structs.
Description: The current implementation of the map_entries method in the Flink library does not provide a way to transform a map into an array of key-value structs. This enhancement aims to add this functionality, allowing users to convert a map into a more structured format for further processing.
## Brief change log
MAP_ENTRIES for Table API and SQL
- Syntax:
` map_entries[map: Map[K, V]] -> Array[Struct<K, V>] `
- Arguments:
map: The input map to be transformed
- Returns: An array of key-value structs obtained from the input map. Each struct consists of two fields: key of type K and value of type V.
- Examples:
Transforming a map into key-value structs:
```
input_map = [1: 'apple', 2: 'banana', 3: 'cherry']
map_entries[input_map]
Output: [{'key': 1, 'value': 'apple'}, {'key': 2, 'value': 'banana'}, {'key': 3, 'value': 'cherry'}]
Handling an empty map:
empty_map = {}
map_entries[empty_map]
Output: []
```
See also: spark:https://spark.apache.org/docs/latest/api/sql/index.html#map_entries
## Verifying this change
- This change added tests in MapFunctionITCase.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (yes / no)
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / no)
- The serializers: (yes / no / don't know)
- The runtime per-record code paths (performance sensitive): (yes / no / don't know)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
- The S3 file system connector: (yes / no / don't know)
## Documentation
- Does this pull request introduce a new feature? (yes / no)
- If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] hanyuzheng7 commented on pull request #23098: [BP-1.17][FLINK-32262] Add MAP_ENTRIES support
Posted by "hanyuzheng7 (via GitHub)" <gi...@apache.org>.
hanyuzheng7 commented on PR #23098:
URL: https://github.com/apache/flink/pull/23098#issuecomment-1666377009
@flinkbot run azure
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] hanyuzheng7 closed pull request #23098: [FLINK-32262] Add MAP_ENTRIES support
Posted by "hanyuzheng7 (via GitHub)" <gi...@apache.org>.
hanyuzheng7 closed pull request #23098: [FLINK-32262] Add MAP_ENTRIES support
URL: https://github.com/apache/flink/pull/23098
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [BP-1.17][FLINK-32262] Add MAP_ENTRIES support [flink]
Posted by "hanyuzheng7 (via GitHub)" <gi...@apache.org>.
hanyuzheng7 closed pull request #23098: [BP-1.17][FLINK-32262] Add MAP_ENTRIES support
URL: https://github.com/apache/flink/pull/23098
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] hanyuzheng7 commented on pull request #23098: [BP-1.17][FLINK-32262] Add MAP_ENTRIES support
Posted by "hanyuzheng7 (via GitHub)" <gi...@apache.org>.
hanyuzheng7 commented on PR #23098:
URL: https://github.com/apache/flink/pull/23098#issuecomment-1670480806
@flinkbot run azure
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] hanyuzheng7 commented on pull request #23098: [BP-1.17][FLINK-32262] Add MAP_ENTRIES support
Posted by "hanyuzheng7 (via GitHub)" <gi...@apache.org>.
hanyuzheng7 commented on PR #23098:
URL: https://github.com/apache/flink/pull/23098#issuecomment-1671389766
@flinkbot run azure
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot commented on pull request #23098: [FLINK-32262] Add MAP_ENTRIES support
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #23098:
URL: https://github.com/apache/flink/pull/23098#issuecomment-1655074207
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "2a0667be43d20203ef1c1b05119c87c1efbd9030",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "2a0667be43d20203ef1c1b05119c87c1efbd9030",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 2a0667be43d20203ef1c1b05119c87c1efbd9030 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org