HuangXingBo opened a new pull request #11224: [FLINK-16252][python] Optimize the progress of the process_outputs in Python UDF URL: https://github.com/apache/flink/pull/11224 ## What is the purpose of the change *This pull request will optimize the progress of the process_outputs in Python UDF* ## Brief change log - *Using value_coder to encode_stream directly in ScalarOperation* ## Verifying this change This change added tests and can be verified as follows: - *It is a perforce improvement without extra 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, Kubernetes/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) 1000w,1 | 90.60 | 76.47 1000w,10 | 164.36 | 148.87 100000000, 1 | 784 | 739
---------------------------------------------------------------- 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
