${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS input_function_table_1"
${CLICKHOUSE_CLIENT} --query="CREATE TABLE input_function_table_1 (a String, b Date, c Int32, d Int16) ENGINE=Memory()"
${CLICKHOUSE_CLIENT} --query="SELECT number, number, number FROM numbers(5) FORMAT CSV" > ${CLICKHOUSE_TMP}/data_for_input_function.csv
cat ${CLICKHOUSE_TMP}/data_for_input_function.csv |${CLICKHOUSE_CLIENT} --query="INSERT INTO input_function_table_1 (a, b, c) SELECT a, b, c*c FROM input('a String, b Int32, c Int32') FORMAT CSV"
${CLICKHOUSE_CLIENT} --query="SELECT * FROM input_function_table_1 FORMAT CSV"
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS input_function_table_2"
${CLICKHOUSE_CLIENT} --query="CREATE TABLE input_function_table_2 (a String, b Date, c Int32, d Int16) ENGINE=Memory()"
cat ${CLICKHOUSE_TMP}/data_for_input_function.csv |${CLICKHOUSE_CLIENT} --query="INSERT INTO input_function_table_3 (a, b, c) SELECT * FROM (SELECT s, b, c*c FROM input('s String, b Int32, c Int32') JOIN input_function_table_1 ON s=input_function_table_1.a) FORMAT CSV"
${CLICKHOUSE_CLIENT} --query="SELECT * FROM input_function_table_4 FORMAT CSV"
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS input_function_table_5"
${CLICKHOUSE_CLIENT} --query="CREATE TABLE input_function_table_5 (a String, b Date, c Int32, d Int16) ENGINE=Memory()"
${CLICKHOUSE_CLIENT} --query="SELECT number, number, number FROM numbers(500000) FORMAT CSV" > ${CLICKHOUSE_TMP}/data_for_input_function.csv
cat ${CLICKHOUSE_TMP}/data_for_input_function.csv |${CLICKHOUSE_CLIENT} --query="INSERT INTO input_function_table_5 (a, b, c) SELECT a, b, c*c FROM input('a String, b Int32, c Int32') FORMAT CSV" --max_block_size=1000
${CLICKHOUSE_CLIENT} --query="SELECT count() FROM input_function_table_5 FORMAT CSV"
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS input_function_table_6"
${CLICKHOUSE_CLIENT} --query="CREATE TABLE input_function_table_6 (a String, b Date, c Int32, d Int16) ENGINE=Memory()"