HuangXingBo opened a new pull request #11107: [FLINK-16071][python] Optimize the cost of the get item of the Row URL: https://github.com/apache/flink/pull/11107 ## What is the purpose of the change *This pull request will Optimize the cost of the get item of the Row in Python UDF* ## Brief change log - *Using FlattenRowCoder in Python UDF* ## Verifying this change This change added tests and can be verified as follows: - *It is the perforce improvements without function test* ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (no) - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no) - The serializers: (no) - The runtime per-record code paths (performance sensitive): (no) - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no) - The S3 file system connector: (no) ## Documentation - Does this pull request introduce a new feature? (no) - If yes, how is the feature documented? (not applicable) ## How does this patch test ### Test Code @udf(input_types=[DataTypes.INT(False)], result_type=DataTypes.INT(False)) def inc(x): return x t_env.register_function("inc", inc) # num_rows = 100000000 num_rows = 100000 num_columns = 100 select_list = ["inc(c%s)" % i for i in range(num_columns)] t_env.register_table_sink( "sink", PrintTableSink( ["c%s" % i for i in range(num_columns)], [DataTypes.INT(False)] * num_columns)) t_env.from_table_source(MultiRowColumnTableSource(num_rows, num_columns)) \ .select(','.join(select_list)) \ .insert_into("sink") beg_time = time.time() t_env.execute("perf_test") print("consume time: " + str(time.time() - beg_time)) ## Test Results num rows, num colums | Consume Time(Before) | Consume Time(After) 10w, 100 | 53.32s | 22.18s 100w,10 | 55.88s | 33.85s
---------------------------------------------------------------- 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] With regards, Apache Git Services
