[jira] [Updated] (FLINK-30959) Improve the documentation of UNIX_TIMESTAMP for different argument format
[ https://issues.apache.org/jira/browse/FLINK-30959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leonard Xu updated FLINK-30959: --- Fix Version/s: 1.16.2 (was: 1.20.0) > Improve the documentation of UNIX_TIMESTAMP for different argument format > - > > Key: FLINK-30959 > URL: https://issues.apache.org/jira/browse/FLINK-30959 > Project: Flink > Issue Type: Improvement > Components: Documentation, Table SQL / API >Affects Versions: 1.16.1 >Reporter: Yunfeng Zhou >Assignee: Hang Ruan >Priority: Major > Labels: pull-request-available, stale-assigned > Fix For: 1.16.2 > > > When running the following pyflink program > > {code:python} > import pandas as pd > from pyflink.datastream import StreamExecutionEnvironment, HashMapStateBackend > from pyflink.table import StreamTableEnvironment > if __name__ == "__main__": > input_data = pd.DataFrame( > [ > ["Alex", 100.0, "2022-01-01 08:00:00.001 +0800"], > ["Emma", 400.0, "2022-01-01 00:00:00.003 +"], > ["Alex", 200.0, "2022-01-01 08:00:00.005 +0800"], > ["Emma", 300.0, "2022-01-01 00:00:00.007 +"], > ["Jack", 500.0, "2022-01-01 08:00:00.009 +0800"], > ["Alex", 450.0, "2022-01-01 00:00:00.011 +"], > ], > columns=["name", "avg_cost", "time"], > ) > env = StreamExecutionEnvironment.get_execution_environment() > env.set_state_backend(HashMapStateBackend()) > t_env = StreamTableEnvironment.create(env) > input_table = t_env.from_pandas(input_data) > t_env.create_temporary_view("input_table", input_table) > time_format = "-MM-dd HH:mm:ss.SSS X" > output_table = t_env.sql_query( > f"SELECT *, UNIX_TIMESTAMP(`time`, '{time_format}') AS unix_time FROM > input_table" > ) > output_table.execute().print() > {code} > The actual output is > {code} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640995200 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 | 1640995200 | > | +I | Emma | 300.0 | > 2022-01-01 00:00:00.007 + | 1640995200 | > | +I | Jack | 500.0 | > 2022-01-01 08:00:00.009 +0800 | 1640995200 | > | +I | Alex | 450.0 | > 2022-01-01 00:00:00.011 + | 1640995200 | > +++++--+ > {code} > While the expected result is > {code:java} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640966400 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 | 1640995200 | > | +I | Emma | 300.0 | > 2022-01-01 00:00:00.007 + | 1640966400 | > | +I | Jack | 500.0 | > 2022-01-01 08:00:00.009 +0800 | 1640995200 | > | +I | Alex | 450.0 | > 2022-01-01 00:00:00.011 + | 1640966400 | > +++++--+ > {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (FLINK-30959) Improve the documentation of UNIX_TIMESTAMP for different argument format
[ https://issues.apache.org/jira/browse/FLINK-30959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] lincoln lee updated FLINK-30959: Fix Version/s: (was: 1.19.0) > Improve the documentation of UNIX_TIMESTAMP for different argument format > - > > Key: FLINK-30959 > URL: https://issues.apache.org/jira/browse/FLINK-30959 > Project: Flink > Issue Type: Improvement > Components: Documentation, Table SQL / API >Affects Versions: 1.16.1 >Reporter: Yunfeng Zhou >Assignee: Hang Ruan >Priority: Major > Labels: pull-request-available, stale-assigned > Fix For: 1.20.0 > > > When running the following pyflink program > > {code:python} > import pandas as pd > from pyflink.datastream import StreamExecutionEnvironment, HashMapStateBackend > from pyflink.table import StreamTableEnvironment > if __name__ == "__main__": > input_data = pd.DataFrame( > [ > ["Alex", 100.0, "2022-01-01 08:00:00.001 +0800"], > ["Emma", 400.0, "2022-01-01 00:00:00.003 +"], > ["Alex", 200.0, "2022-01-01 08:00:00.005 +0800"], > ["Emma", 300.0, "2022-01-01 00:00:00.007 +"], > ["Jack", 500.0, "2022-01-01 08:00:00.009 +0800"], > ["Alex", 450.0, "2022-01-01 00:00:00.011 +"], > ], > columns=["name", "avg_cost", "time"], > ) > env = StreamExecutionEnvironment.get_execution_environment() > env.set_state_backend(HashMapStateBackend()) > t_env = StreamTableEnvironment.create(env) > input_table = t_env.from_pandas(input_data) > t_env.create_temporary_view("input_table", input_table) > time_format = "-MM-dd HH:mm:ss.SSS X" > output_table = t_env.sql_query( > f"SELECT *, UNIX_TIMESTAMP(`time`, '{time_format}') AS unix_time FROM > input_table" > ) > output_table.execute().print() > {code} > The actual output is > {code} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640995200 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 | 1640995200 | > | +I | Emma | 300.0 | > 2022-01-01 00:00:00.007 + | 1640995200 | > | +I | Jack | 500.0 | > 2022-01-01 08:00:00.009 +0800 | 1640995200 | > | +I | Alex | 450.0 | > 2022-01-01 00:00:00.011 + | 1640995200 | > +++++--+ > {code} > While the expected result is > {code:java} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640966400 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 | 1640995200 | > | +I | Emma | 300.0 | > 2022-01-01 00:00:00.007 + | 1640966400 | > | +I | Jack | 500.0 | > 2022-01-01 08:00:00.009 +0800 | 1640995200 | > | +I | Alex | 450.0 | > 2022-01-01 00:00:00.011 + | 1640966400 | > +++++--+ > {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (FLINK-30959) Improve the documentation of UNIX_TIMESTAMP for different argument format
[ https://issues.apache.org/jira/browse/FLINK-30959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] lincoln lee updated FLINK-30959: Fix Version/s: 1.20.0 > Improve the documentation of UNIX_TIMESTAMP for different argument format > - > > Key: FLINK-30959 > URL: https://issues.apache.org/jira/browse/FLINK-30959 > Project: Flink > Issue Type: Improvement > Components: Documentation, Table SQL / API >Affects Versions: 1.16.1 >Reporter: Yunfeng Zhou >Assignee: Hang Ruan >Priority: Major > Labels: pull-request-available, stale-assigned > Fix For: 1.19.0, 1.20.0 > > > When running the following pyflink program > > {code:python} > import pandas as pd > from pyflink.datastream import StreamExecutionEnvironment, HashMapStateBackend > from pyflink.table import StreamTableEnvironment > if __name__ == "__main__": > input_data = pd.DataFrame( > [ > ["Alex", 100.0, "2022-01-01 08:00:00.001 +0800"], > ["Emma", 400.0, "2022-01-01 00:00:00.003 +"], > ["Alex", 200.0, "2022-01-01 08:00:00.005 +0800"], > ["Emma", 300.0, "2022-01-01 00:00:00.007 +"], > ["Jack", 500.0, "2022-01-01 08:00:00.009 +0800"], > ["Alex", 450.0, "2022-01-01 00:00:00.011 +"], > ], > columns=["name", "avg_cost", "time"], > ) > env = StreamExecutionEnvironment.get_execution_environment() > env.set_state_backend(HashMapStateBackend()) > t_env = StreamTableEnvironment.create(env) > input_table = t_env.from_pandas(input_data) > t_env.create_temporary_view("input_table", input_table) > time_format = "-MM-dd HH:mm:ss.SSS X" > output_table = t_env.sql_query( > f"SELECT *, UNIX_TIMESTAMP(`time`, '{time_format}') AS unix_time FROM > input_table" > ) > output_table.execute().print() > {code} > The actual output is > {code} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640995200 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 | 1640995200 | > | +I | Emma | 300.0 | > 2022-01-01 00:00:00.007 + | 1640995200 | > | +I | Jack | 500.0 | > 2022-01-01 08:00:00.009 +0800 | 1640995200 | > | +I | Alex | 450.0 | > 2022-01-01 00:00:00.011 + | 1640995200 | > +++++--+ > {code} > While the expected result is > {code:java} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640966400 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 | 1640995200 | > | +I | Emma | 300.0 | > 2022-01-01 00:00:00.007 + | 1640966400 | > | +I | Jack | 500.0 | > 2022-01-01 08:00:00.009 +0800 | 1640995200 | > | +I | Alex | 450.0 | > 2022-01-01 00:00:00.011 + | 1640966400 | > +++++--+ > {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (FLINK-30959) Improve the documentation of UNIX_TIMESTAMP for different argument format
[ https://issues.apache.org/jira/browse/FLINK-30959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jing Ge updated FLINK-30959: Fix Version/s: 1.19.0 (was: 1.18.0) (was: 1.16.3) (was: 1.17.2) > Improve the documentation of UNIX_TIMESTAMP for different argument format > - > > Key: FLINK-30959 > URL: https://issues.apache.org/jira/browse/FLINK-30959 > Project: Flink > Issue Type: Improvement > Components: Documentation, Table SQL / API >Affects Versions: 1.16.1 >Reporter: Yunfeng Zhou >Assignee: Hang Ruan >Priority: Major > Labels: pull-request-available, stale-assigned > Fix For: 1.19.0 > > > When running the following pyflink program > > {code:python} > import pandas as pd > from pyflink.datastream import StreamExecutionEnvironment, HashMapStateBackend > from pyflink.table import StreamTableEnvironment > if __name__ == "__main__": > input_data = pd.DataFrame( > [ > ["Alex", 100.0, "2022-01-01 08:00:00.001 +0800"], > ["Emma", 400.0, "2022-01-01 00:00:00.003 +"], > ["Alex", 200.0, "2022-01-01 08:00:00.005 +0800"], > ["Emma", 300.0, "2022-01-01 00:00:00.007 +"], > ["Jack", 500.0, "2022-01-01 08:00:00.009 +0800"], > ["Alex", 450.0, "2022-01-01 00:00:00.011 +"], > ], > columns=["name", "avg_cost", "time"], > ) > env = StreamExecutionEnvironment.get_execution_environment() > env.set_state_backend(HashMapStateBackend()) > t_env = StreamTableEnvironment.create(env) > input_table = t_env.from_pandas(input_data) > t_env.create_temporary_view("input_table", input_table) > time_format = "-MM-dd HH:mm:ss.SSS X" > output_table = t_env.sql_query( > f"SELECT *, UNIX_TIMESTAMP(`time`, '{time_format}') AS unix_time FROM > input_table" > ) > output_table.execute().print() > {code} > The actual output is > {code} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640995200 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 | 1640995200 | > | +I | Emma | 300.0 | > 2022-01-01 00:00:00.007 + | 1640995200 | > | +I | Jack | 500.0 | > 2022-01-01 08:00:00.009 +0800 | 1640995200 | > | +I | Alex | 450.0 | > 2022-01-01 00:00:00.011 + | 1640995200 | > +++++--+ > {code} > While the expected result is > {code:java} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640966400 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 | 1640995200 | > | +I | Emma | 300.0 | > 2022-01-01 00:00:00.007 + | 1640966400 | > | +I | Jack | 500.0 | > 2022-01-01 08:00:00.009 +0800 | 1640995200 | > | +I | Alex | 450.0 | > 2022-01-01 00:00:00.011 + | 1640966400 | > +++++--+ > {code} > -- This message was sent by Atlassian Jira
[jira] [Updated] (FLINK-30959) Improve the documentation of UNIX_TIMESTAMP for different argument format
[ https://issues.apache.org/jira/browse/FLINK-30959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Flink Jira Bot updated FLINK-30959: --- Labels: pull-request-available stale-assigned (was: pull-request-available) I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help the community manage its development. I see this issue is assigned but has not received an update in 30 days, so it has been labeled "stale-assigned". If you are still working on the issue, please remove the label and add a comment updating the community on your progress. If this issue is waiting on feedback, please consider this a reminder to the committer/reviewer. Flink is a very active project, and so we appreciate your patience. If you are no longer working on the issue, please unassign yourself so someone else may work on it. > Improve the documentation of UNIX_TIMESTAMP for different argument format > - > > Key: FLINK-30959 > URL: https://issues.apache.org/jira/browse/FLINK-30959 > Project: Flink > Issue Type: Improvement > Components: Documentation, Table SQL / API >Affects Versions: 1.16.1 >Reporter: Yunfeng Zhou >Assignee: Hang Ruan >Priority: Major > Labels: pull-request-available, stale-assigned > Fix For: 1.18.0, 1.16.3, 1.17.2 > > > When running the following pyflink program > > {code:python} > import pandas as pd > from pyflink.datastream import StreamExecutionEnvironment, HashMapStateBackend > from pyflink.table import StreamTableEnvironment > if __name__ == "__main__": > input_data = pd.DataFrame( > [ > ["Alex", 100.0, "2022-01-01 08:00:00.001 +0800"], > ["Emma", 400.0, "2022-01-01 00:00:00.003 +"], > ["Alex", 200.0, "2022-01-01 08:00:00.005 +0800"], > ["Emma", 300.0, "2022-01-01 00:00:00.007 +"], > ["Jack", 500.0, "2022-01-01 08:00:00.009 +0800"], > ["Alex", 450.0, "2022-01-01 00:00:00.011 +"], > ], > columns=["name", "avg_cost", "time"], > ) > env = StreamExecutionEnvironment.get_execution_environment() > env.set_state_backend(HashMapStateBackend()) > t_env = StreamTableEnvironment.create(env) > input_table = t_env.from_pandas(input_data) > t_env.create_temporary_view("input_table", input_table) > time_format = "-MM-dd HH:mm:ss.SSS X" > output_table = t_env.sql_query( > f"SELECT *, UNIX_TIMESTAMP(`time`, '{time_format}') AS unix_time FROM > input_table" > ) > output_table.execute().print() > {code} > The actual output is > {code} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640995200 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 | 1640995200 | > | +I | Emma | 300.0 | > 2022-01-01 00:00:00.007 + | 1640995200 | > | +I | Jack | 500.0 | > 2022-01-01 08:00:00.009 +0800 | 1640995200 | > | +I | Alex | 450.0 | > 2022-01-01 00:00:00.011 + | 1640995200 | > +++++--+ > {code} > While the expected result is > {code:java} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640966400 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 |
[jira] [Updated] (FLINK-30959) Improve the documentation of UNIX_TIMESTAMP for different argument format
[ https://issues.apache.org/jira/browse/FLINK-30959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Weijie Guo updated FLINK-30959: --- Fix Version/s: 1.16.3 1.17.2 (was: 1.16.2) > Improve the documentation of UNIX_TIMESTAMP for different argument format > - > > Key: FLINK-30959 > URL: https://issues.apache.org/jira/browse/FLINK-30959 > Project: Flink > Issue Type: Improvement > Components: Documentation, Table SQL / API >Affects Versions: 1.16.1 >Reporter: Yunfeng Zhou >Assignee: Hang Ruan >Priority: Major > Labels: pull-request-available > Fix For: 1.18.0, 1.16.3, 1.17.2 > > > When running the following pyflink program > > {code:python} > import pandas as pd > from pyflink.datastream import StreamExecutionEnvironment, HashMapStateBackend > from pyflink.table import StreamTableEnvironment > if __name__ == "__main__": > input_data = pd.DataFrame( > [ > ["Alex", 100.0, "2022-01-01 08:00:00.001 +0800"], > ["Emma", 400.0, "2022-01-01 00:00:00.003 +"], > ["Alex", 200.0, "2022-01-01 08:00:00.005 +0800"], > ["Emma", 300.0, "2022-01-01 00:00:00.007 +"], > ["Jack", 500.0, "2022-01-01 08:00:00.009 +0800"], > ["Alex", 450.0, "2022-01-01 00:00:00.011 +"], > ], > columns=["name", "avg_cost", "time"], > ) > env = StreamExecutionEnvironment.get_execution_environment() > env.set_state_backend(HashMapStateBackend()) > t_env = StreamTableEnvironment.create(env) > input_table = t_env.from_pandas(input_data) > t_env.create_temporary_view("input_table", input_table) > time_format = "-MM-dd HH:mm:ss.SSS X" > output_table = t_env.sql_query( > f"SELECT *, UNIX_TIMESTAMP(`time`, '{time_format}') AS unix_time FROM > input_table" > ) > output_table.execute().print() > {code} > The actual output is > {code} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640995200 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 | 1640995200 | > | +I | Emma | 300.0 | > 2022-01-01 00:00:00.007 + | 1640995200 | > | +I | Jack | 500.0 | > 2022-01-01 08:00:00.009 +0800 | 1640995200 | > | +I | Alex | 450.0 | > 2022-01-01 00:00:00.011 + | 1640995200 | > +++++--+ > {code} > While the expected result is > {code:java} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640966400 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 | 1640995200 | > | +I | Emma | 300.0 | > 2022-01-01 00:00:00.007 + | 1640966400 | > | +I | Jack | 500.0 | > 2022-01-01 08:00:00.009 +0800 | 1640995200 | > | +I | Alex | 450.0 | > 2022-01-01 00:00:00.011 + | 1640966400 | > +++++--+ > {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (FLINK-30959) Improve the documentation of UNIX_TIMESTAMP for different argument format
[ https://issues.apache.org/jira/browse/FLINK-30959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xintong Song updated FLINK-30959: - Fix Version/s: 1.18.0 (was: 1.17.0) > Improve the documentation of UNIX_TIMESTAMP for different argument format > - > > Key: FLINK-30959 > URL: https://issues.apache.org/jira/browse/FLINK-30959 > Project: Flink > Issue Type: Improvement > Components: Documentation, Table SQL / API >Affects Versions: 1.16.1 >Reporter: Yunfeng Zhou >Assignee: Hang Ruan >Priority: Major > Labels: pull-request-available > Fix For: 1.16.2, 1.18.0 > > > When running the following pyflink program > > {code:python} > import pandas as pd > from pyflink.datastream import StreamExecutionEnvironment, HashMapStateBackend > from pyflink.table import StreamTableEnvironment > if __name__ == "__main__": > input_data = pd.DataFrame( > [ > ["Alex", 100.0, "2022-01-01 08:00:00.001 +0800"], > ["Emma", 400.0, "2022-01-01 00:00:00.003 +"], > ["Alex", 200.0, "2022-01-01 08:00:00.005 +0800"], > ["Emma", 300.0, "2022-01-01 00:00:00.007 +"], > ["Jack", 500.0, "2022-01-01 08:00:00.009 +0800"], > ["Alex", 450.0, "2022-01-01 00:00:00.011 +"], > ], > columns=["name", "avg_cost", "time"], > ) > env = StreamExecutionEnvironment.get_execution_environment() > env.set_state_backend(HashMapStateBackend()) > t_env = StreamTableEnvironment.create(env) > input_table = t_env.from_pandas(input_data) > t_env.create_temporary_view("input_table", input_table) > time_format = "-MM-dd HH:mm:ss.SSS X" > output_table = t_env.sql_query( > f"SELECT *, UNIX_TIMESTAMP(`time`, '{time_format}') AS unix_time FROM > input_table" > ) > output_table.execute().print() > {code} > The actual output is > {code} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640995200 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 | 1640995200 | > | +I | Emma | 300.0 | > 2022-01-01 00:00:00.007 + | 1640995200 | > | +I | Jack | 500.0 | > 2022-01-01 08:00:00.009 +0800 | 1640995200 | > | +I | Alex | 450.0 | > 2022-01-01 00:00:00.011 + | 1640995200 | > +++++--+ > {code} > While the expected result is > {code:java} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640966400 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 | 1640995200 | > | +I | Emma | 300.0 | > 2022-01-01 00:00:00.007 + | 1640966400 | > | +I | Jack | 500.0 | > 2022-01-01 08:00:00.009 +0800 | 1640995200 | > | +I | Alex | 450.0 | > 2022-01-01 00:00:00.011 + | 1640966400 | > +++++--+ > {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (FLINK-30959) Improve the documentation of UNIX_TIMESTAMP for different argument format
[ https://issues.apache.org/jira/browse/FLINK-30959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated FLINK-30959: --- Labels: pull-request-available (was: ) > Improve the documentation of UNIX_TIMESTAMP for different argument format > - > > Key: FLINK-30959 > URL: https://issues.apache.org/jira/browse/FLINK-30959 > Project: Flink > Issue Type: Improvement > Components: Documentation, Table SQL / API >Affects Versions: 1.16.1 >Reporter: Yunfeng Zhou >Assignee: Hang Ruan >Priority: Major > Labels: pull-request-available > Fix For: 1.17.0, 1.16.2 > > > When running the following pyflink program > > {code:python} > import pandas as pd > from pyflink.datastream import StreamExecutionEnvironment, HashMapStateBackend > from pyflink.table import StreamTableEnvironment > if __name__ == "__main__": > input_data = pd.DataFrame( > [ > ["Alex", 100.0, "2022-01-01 08:00:00.001 +0800"], > ["Emma", 400.0, "2022-01-01 00:00:00.003 +"], > ["Alex", 200.0, "2022-01-01 08:00:00.005 +0800"], > ["Emma", 300.0, "2022-01-01 00:00:00.007 +"], > ["Jack", 500.0, "2022-01-01 08:00:00.009 +0800"], > ["Alex", 450.0, "2022-01-01 00:00:00.011 +"], > ], > columns=["name", "avg_cost", "time"], > ) > env = StreamExecutionEnvironment.get_execution_environment() > env.set_state_backend(HashMapStateBackend()) > t_env = StreamTableEnvironment.create(env) > input_table = t_env.from_pandas(input_data) > t_env.create_temporary_view("input_table", input_table) > time_format = "-MM-dd HH:mm:ss.SSS X" > output_table = t_env.sql_query( > f"SELECT *, UNIX_TIMESTAMP(`time`, '{time_format}') AS unix_time FROM > input_table" > ) > output_table.execute().print() > {code} > The actual output is > {code} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640995200 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 | 1640995200 | > | +I | Emma | 300.0 | > 2022-01-01 00:00:00.007 + | 1640995200 | > | +I | Jack | 500.0 | > 2022-01-01 08:00:00.009 +0800 | 1640995200 | > | +I | Alex | 450.0 | > 2022-01-01 00:00:00.011 + | 1640995200 | > +++++--+ > {code} > While the expected result is > {code:java} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640966400 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 | 1640995200 | > | +I | Emma | 300.0 | > 2022-01-01 00:00:00.007 + | 1640966400 | > | +I | Jack | 500.0 | > 2022-01-01 08:00:00.009 +0800 | 1640995200 | > | +I | Alex | 450.0 | > 2022-01-01 00:00:00.011 + | 1640966400 | > +++++--+ > {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (FLINK-30959) Improve the documentation of UNIX_TIMESTAMP for different argument format
[ https://issues.apache.org/jira/browse/FLINK-30959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jark Wu updated FLINK-30959: Summary: Improve the documentation of UNIX_TIMESTAMP for different argument format (was: UNIX_TIMESTAMP's return value does not meet expected) > Improve the documentation of UNIX_TIMESTAMP for different argument format > - > > Key: FLINK-30959 > URL: https://issues.apache.org/jira/browse/FLINK-30959 > Project: Flink > Issue Type: Improvement > Components: Documentation, Table SQL / API >Affects Versions: 1.16.1 >Reporter: Yunfeng Zhou >Priority: Major > Fix For: 1.17.0, 1.16.2 > > > When running the following pyflink program > > {code:python} > import pandas as pd > from pyflink.datastream import StreamExecutionEnvironment, HashMapStateBackend > from pyflink.table import StreamTableEnvironment > if __name__ == "__main__": > input_data = pd.DataFrame( > [ > ["Alex", 100.0, "2022-01-01 08:00:00.001 +0800"], > ["Emma", 400.0, "2022-01-01 00:00:00.003 +"], > ["Alex", 200.0, "2022-01-01 08:00:00.005 +0800"], > ["Emma", 300.0, "2022-01-01 00:00:00.007 +"], > ["Jack", 500.0, "2022-01-01 08:00:00.009 +0800"], > ["Alex", 450.0, "2022-01-01 00:00:00.011 +"], > ], > columns=["name", "avg_cost", "time"], > ) > env = StreamExecutionEnvironment.get_execution_environment() > env.set_state_backend(HashMapStateBackend()) > t_env = StreamTableEnvironment.create(env) > input_table = t_env.from_pandas(input_data) > t_env.create_temporary_view("input_table", input_table) > time_format = "-MM-dd HH:mm:ss.SSS X" > output_table = t_env.sql_query( > f"SELECT *, UNIX_TIMESTAMP(`time`, '{time_format}') AS unix_time FROM > input_table" > ) > output_table.execute().print() > {code} > The actual output is > {code} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640995200 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 | 1640995200 | > | +I | Emma | 300.0 | > 2022-01-01 00:00:00.007 + | 1640995200 | > | +I | Jack | 500.0 | > 2022-01-01 08:00:00.009 +0800 | 1640995200 | > | +I | Alex | 450.0 | > 2022-01-01 00:00:00.011 + | 1640995200 | > +++++--+ > {code} > While the expected result is > {code:java} > +++++--+ > | op | name | avg_cost | > time |unix_time | > +++++--+ > | +I | Alex | 100.0 | > 2022-01-01 08:00:00.001 +0800 | 1640995200 | > | +I | Emma | 400.0 | > 2022-01-01 00:00:00.003 + | 1640966400 | > | +I | Alex | 200.0 | > 2022-01-01 08:00:00.005 +0800 | 1640995200 | > | +I | Emma | 300.0 | > 2022-01-01 00:00:00.007 + | 1640966400 | > | +I | Jack | 500.0 | > 2022-01-01 08:00:00.009 +0800 | 1640995200 | > | +I | Alex | 450.0 | > 2022-01-01 00:00:00.011 + | 1640966400 | > +++++--+ > {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)