This is an automated email from the ASF dual-hosted git repository. dwysakowicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
commit 62ecdb3ca6c0d47a0a96d55df683fd3ea27de39a Author: Dawid Wysakowicz <dwysakow...@apache.org> AuthorDate: Thu Oct 25 10:08:32 2018 +0200 [FLINK-10623][e2e] Extended sql-client e2e test with MATCH_RECOGNIZE --- flink-end-to-end-tests/test-scripts/common.sh | 1 + .../test-scripts/test_sql_client.sh | 28 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/flink-end-to-end-tests/test-scripts/common.sh b/flink-end-to-end-tests/test-scripts/common.sh index 618aae8..5eb2c93 100644 --- a/flink-end-to-end-tests/test-scripts/common.sh +++ b/flink-end-to-end-tests/test-scripts/common.sh @@ -306,6 +306,7 @@ function check_logs_for_errors { | grep -v "Async Kafka commit failed" \ | grep -v "DisconnectException" \ | grep -v "AskTimeoutException" \ + | grep -v "Error while loading kafka-version.properties" \ | grep -v "WARN akka.remote.transport.netty.NettyTransport" \ | grep -v "WARN org.apache.flink.shaded.akka.org.jboss.netty.channel.DefaultChannelPipeline" \ | grep -v "jvm-exit-on-fatal-error" \ diff --git a/flink-end-to-end-tests/test-scripts/test_sql_client.sh b/flink-end-to-end-tests/test-scripts/test_sql_client.sh index 6b57dd9..ce3d194 100755 --- a/flink-end-to-end-tests/test-scripts/test_sql_client.sh +++ b/flink-end-to-end-tests/test-scripts/test_sql_client.sh @@ -404,3 +404,31 @@ wait_job_terminal_state "$JOB_ID" "FINISHED" # 3 upsert results and 6 append results verify_result_line_number 9 "$ELASTICSEARCH_INDEX" + +echo "Executing SQL: Match recognize -> Elasticsearch" + +read -r -d '' SQL_STATEMENT_5 << EOF +INSERT INTO ElasticsearchAppendSinkTable + SELECT 1 as user_id, T.userName as user_name, cast(1 as BIGINT) as user_count + FROM ( + SELECT user, rowtime + FROM JsonSourceTable + WHERE user IS NOT NULL) + MATCH_RECOGNIZE ( + ORDER BY rowtime + MEASURES + user as userName + PATTERN (A) + DEFINE + A as user = 'Alice' + ) T +EOF + +JOB_ID=$($FLINK_DIR/bin/sql-client.sh embedded \ + --library $SQL_JARS_DIR \ + --jar $SQL_TOOLBOX_JAR \ + --environment $SQL_CONF \ + --update "$SQL_STATEMENT_5" | grep "Job ID:" | sed 's/.* //g') + +# 3 upsert results and 6 append results and 3 match_recognize results +verify_result_line_number 12 "$ELASTICSEARCH_INDEX"