{"id":314054,"date":"2020-11-30T15:02:39","date_gmt":"2020-11-30T15:02:39","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=314054"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=314054","title":{"rendered":"Spark 3.0: \u043d\u043e\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u2013 \u0447\u0430\u0441\u0442\u044c 1"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041a \u043d\u0430\u0448\u0435\u0439 \u043d\u043e\u0432\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 <a href=\"https:\/\/newprolab.com\/ru\/spark-de?utm_source=habr&amp;utm_medium=social&amp;utm_campaign=sparkDE&amp;utm_content=blog3011\"><strong>&#171;Apache Spark \u0434\u043b\u044f \u0434\u0430\u0442\u0430-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432&#187;<\/strong><\/a> \u0438 <a href=\"https:\/\/www.facebook.com\/events\/444357059928208\/\"><strong>\u0432\u0435\u0431\u0438\u043d\u0430\u0440\u0443 \u043e \u043a\u0443\u0440\u0441\u0435<\/strong><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0439\u0434\u0435\u0442 2 \u0434\u0435\u043a\u0430\u0431\u0440\u044f, \u043c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043e\u0431\u0437\u043e\u0440\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e Spark 3.0. <\/p>\n<p>Spark 3.0 \u0432\u044b\u0448\u0435\u043b \u0441 \u0446\u0435\u043b\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0432\u0430\u0436\u043d\u044b\u0445 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439, \u0441\u0440\u0435\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445: \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ADQ, \u0447\u0442\u0435\u043d\u0438\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 SQL \u0438 Python, Python 3.0, \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 Hadoop 3, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 ACID.&nbsp;<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0430\u0432\u0442\u043e\u0440 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u043d\u043e\u0432\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u042d\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 Spark 3.0 \u0438 \u0443 \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435.<\/p>\n<\/p>\n<p><strong>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Spark 3.0:<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (AQE)<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043d\u043e\u0432\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u043e\u0432\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u0427\u0442\u0435\u043d\u0438\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043f\u0430\u043f\u043e\u043a<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u043d\u043e\u0433\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 (||)<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u043e\u0432\u044b\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Spark<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u043b\u0435\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0433\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>Data Frame Tail<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u0424\u0443\u043d\u043a\u0446\u0438\u044f Repartition \u0432 SQL \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 ANSI SQL<\/strong><\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0410\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/strong><\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (AQE) \u2013 \u044d\u0442\u043e, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u043e\u0434\u043d\u043e \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 Spark 3.0. \u041e\u043d\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u0442 \u043f\u043b\u0430\u043d\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<p>\u0414\u043e \u0432\u044b\u0445\u043e\u0434\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 3.0 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432 Spark \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u0430 \u043f\u0443\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043b\u0430\u043d\u0430 \u0434\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0430 \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f, Spark \u043d\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0442\u0440\u0438\u043a, \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u044b\u0445 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. AQE \u0432\u043e\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0431\u0435\u043b, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u0445, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u044d\u0442\u0430\u043f\u0435.&nbsp;&nbsp;<\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (AQE) \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0430. \u0414\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e spark.sql.adaptive.enabled&nbsp;\u043d\u0430 true. \u0421 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 AQE, Spark \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0434\u0432\u0443\u043a\u0440\u0430\u0442\u043d\u043e\u0435 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c TPC-DS \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 Spark 2.4&nbsp;<\/p>\n<p>AQE \u0432 Spark 3.0 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 3 \u0432\u0430\u0436\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u044b, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 join sort-merge \u0432 broadcast \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435&nbsp;<\/p>\n<\/li>\n<li>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0434\u0436\u043e\u0439\u043d\u044b \u0441\u043e \u0441\u043a\u043e\u0448\u0435\u043d\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043d\u043e\u0432\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432<\/strong><\/p>\n<p>\u0412 Spark 3.0 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u043b\u0430\u0441\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u044f\u0437\u044b\u043a\u043e\u0432, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f:&nbsp;<\/p>\n<ul>\n<li>\n<p>Python3 (Python 2.x)<\/p>\n<\/li>\n<li>\n<p>Scala 2.12<\/p>\n<\/li>\n<li>\n<p>JDK 11<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u043e\u0432\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 Hadoop \u0434\u043e 3 \u0432\u0435\u0440\u0441\u0438\u0438, Kafka \u0434\u043e 2.4.1 \u0438 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439.<\/p>\n<\/p>\n<p><strong>\u041d\u043e\u0432\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f Spark Structured Streaming<\/strong><\/p>\n<p>\u0412 web-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 Spark \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043d\u043e\u0432\u0430\u044f \u0432\u043a\u043b\u0430\u0434\u043a\u0430 \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0412 \u044d\u0442\u043e\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0437\u0430\u043f\u0443\u0441\u043a\u0430, \u0441\u0442\u0430\u0442\u0443\u0441, \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u0438\u043a\u0440\u043e-\u043f\u0430\u043a\u0435\u0442\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0438 \u0432\u043e\u0432\u0440\u0435\u043c\u044f \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<p>\u0412\u043a\u043b\u0430\u0434\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 2 \u0440\u0430\u0437\u0434\u0435\u043b\u0430:<\/p>\n<ul>\n<li>\n<p>\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b&nbsp;<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/74d\/db0\/966\/74ddb0966db44787bc4c723b691c7841\" width=\"800\" height=\"342\"><figcaption><\/figcaption><\/figure>\n<p><em>                                                                                                                       \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: Databricks<\/em><\/p>\n<\/p>\n<p>\u0420\u0430\u0437\u0434\u0435\u043b \u00abActive Streaming Queries\u00bb \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0432\u0441\u0435 <strong>\u0442\u0435\u043a\u0443\u0449\u0438\u0435<\/strong> \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0430 \u0440\u0430\u0437\u0434\u0435\u043b \u00abCompleted Streaming Queries\u00bb \u2013 \u0432\u0441\u0435 <strong>\u043d\u0435\u0443\u0434\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u0435<\/strong>.&nbsp;<\/p>\n<p>\u041f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 Run ID \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c: \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u0432\u043e\u0434\u0430, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430, \u0432\u0440\u0435\u043c\u044f, \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0432 Databricks.<\/p>\n<\/p>\n<p><strong>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432&nbsp;<\/strong><\/p>\n<p>Spark 3.0 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u201cbinaryFile\u201d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b.<\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 binaryFile, DataFrameReader \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0444\u043e\u0440\u043c\u0430\u0442\u044b image, pdf, zip, gzip, tar \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u041a\u0430\u0436\u0434\u044b\u0439 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u0435, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u0430.&nbsp;&nbsp;<\/p>\n<p><code>val df = spark.read.format(\"binaryFile\").load(\"\/tmp\/binary\/spark.png\")<\/code><\/p>\n<p><code>df.printSchema()<\/code><\/p>\n<p><code>df.show()<\/code><\/p>\n<\/p>\n<p>\u0412\u044b\u0434\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/p>\n<p><code>root<\/code><\/p>\n<p><code>&nbsp;|-- path: string (nullable = true)<\/code><\/p>\n<p><code>&nbsp;|-- modificationTime: timestamp (nullable = true)<\/code><\/p>\n<p><code>&nbsp;|-- length: long (nullable = true)<\/code><\/p>\n<p><code>&nbsp;|-- content: binary (nullable = true)&nbsp;<\/code><\/p>\n<p><code>+--------------------+--------------------+------+--------------------+<\/code><\/p>\n<p><code>|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; path|&nbsp; &nbsp; modificationTime|length| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content|<\/code><\/p>\n<p><code>+--------------------+--------------------+------+--------------------+<\/code><\/p>\n<p><code>|file:\/C:\/tmp\/bina\u2026|2020-07-25 10:11:\u2026| 74675|[89 50 4E 47 0D 0...|<\/code><\/p>\n<p><code>+--------------------+--------------------+------+--------------------+<\/code><\/p>\n<p><strong>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043f\u0430\u043f\u043e\u043a<\/strong><\/p>\n<p>\u0412 Spark 3.0 \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f&nbsp;recursiveFileLookup, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0445 \u043f\u043e\u0434\u043f\u0430\u043f\u043e\u043a. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f true&nbsp;\u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u043e\u043f\u0446\u0438\u0438, DataFrameReader \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0444\u0430\u0439\u043b\u044b, \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u044f \u0432\u0441\u0435 \u043f\u0430\u043f\u043a\u0438 \u0438 \u043f\u043e\u0434\u043f\u0430\u043f\u043a\u0438 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438.<\/p>\n<p><code>spark.read.option(\"recursiveFileLookup\", \"true\").csv(\"\/path\/to\/folder\")<\/code><\/p>\n<\/p>\n<p><strong>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u043d\u043e\u0433\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445&nbsp;<\/strong><\/p>\n<p>\u0412 Spark 3.0 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043d\u043e\u0433\u043e\u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f (||) \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u0438 \u0437\u0430\u043f\u0438\u0441\u0438 CSV \u0444\u0430\u0439\u043b\u043e\u0432. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c CSV \u0444\u0430\u0439\u043b \u0441 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435\u043c:<\/p>\n<p>&nbsp;<code>col1||col2||col3||col4<\/code><\/p>\n<p><code>val1||val2||val3||val4<\/code><\/p>\n<p><code>val1||val2||val3||val4<\/code><\/p>\n<\/p>\n<p>\u041e\u043d \u043c\u043e\u0436\u0435\u0442 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>&nbsp;<code>val df&nbsp; = spark.read<\/code><\/p>\n<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.option(\"delimiter\",\"||\")<\/code><\/p>\n<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.option(\"header\",\"true\")<\/code><\/p>\n<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.csv(\"\/tmp\/data\/douplepipedata.csv\")<\/code><\/p>\n<\/p>\n<p>\u0412 Spark 2.x \u043c\u043d\u043e\u0433\u043e\u0437\u043d\u0430\u0447\u043d\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0432 \u043e\u0434\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u041f\u043e\u043f\u044b\u0442\u043a\u0438 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0431\u0435\u0437 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439:<\/p>\n<p>&nbsp;<code>throws java.lang.IllegalArgumentException: Delimiter cannot be more than one character: ||<\/code><\/p>\n<\/p>\n<p><strong>\u041d\u043e\u0432\u044b\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Spark<\/strong><\/p>\n<p>\u041a \u0432\u043d\u0443\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u0441\u043f\u0438\u0441\u043a\u0443 \u0438\u0437 \u0441\u043e\u0442\u0435\u043d \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 Spark SQL, \u0442\u0440\u0435\u0442\u044c\u044f \u0432\u0435\u0440\u0441\u0438\u044f Spark \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430 \u043d\u043e\u0432\u044b\u0435.&nbsp;<\/p>\n<\/p>\n<p><code>sinh,cosh,tanh,asinh,acosh,atanh,any,bitand,bitor,bitcount,bitxor,<\/code><\/p>\n<p><code>booland,boolor,countif,datepart,extract,forall,fromcsv,<\/code><\/p>\n<p><code>makedate,makeinterval,maketimestamp,mapentries<\/code><\/p>\n<p><code>mapfilter,mapzipwith,maxby,minby,schemaofcsv,tocsv<\/code><\/p>\n<p><code>transformkeys,transform_values,typeof,version<\/code><\/p>\n<p><code>xxhash64<\/code><\/p>\n<\/p>\n<p><strong>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u041f\u0440\u043e\u043b\u0435\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c&nbsp;<\/strong><\/p>\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Spark \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u0430\u0442\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u042e\u043b\u0438\u0430\u043d\u0441\u043a\u043e\u0433\u043e \u0438 \u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u043e\u0433\u043e \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044f: \u0434\u043b\u044f \u0434\u0430\u0442 \u0434\u043e 1582 \u0433\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u042e\u043b\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c, \u0430 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u0445 \u0434\u0430\u0442 \u2013 \u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439. <\/p>\n<p>\u0412 JDK 7 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u0442 \u0436\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c<code> java.sql.Date&nbsp;API<\/code>. \u0412 JDK 8 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d <code>java.time.LocalDate&nbsp;API <\/code>\u0441 \u043e\u043f\u0446\u0438\u0435\u0439 \u043f\u0435\u0440\u0435\u0441\u0447\u0435\u0442\u0430 \u0434\u0430\u0442 \u043f\u043e \u041f\u0440\u043e\u043b\u0435\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u043e\u043c\u0443 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044e.&nbsp;<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432 Spark 3.0 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u043e\u043f\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u041f\u0440\u043e\u043b\u0435\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u043a Pandas, R \u0438 Apache Arrow. \u0415\u0441\u043b\u0438 \u0432\u044b \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0435 \u0434\u0430\u0442\u0430\u043c\u0438 \u0432 \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u043f\u043e\u0441\u043b\u0435 15 \u043e\u043a\u0442\u044f\u0431\u0440\u044f 1582 \u0433., \u0442\u043e \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Date&amp;Timestamp, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0432 Spark \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 3.0, \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e. \u0412\u0430\u0448\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0434\u0430\u0442\u044b \u0432 \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0434\u043e 15 \u043e\u043a\u0442\u044f\u0431\u0440\u044f 1582 \u0433.<\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u043e\u043f\u0446\u0438\u0435\u0439 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u041f\u0440\u043e\u043b\u0435\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c \u0432 Spark 3.0 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043d\u043e\u0432\u044b\u0435 Date &amp; Timestamp \u0444\u0443\u043d\u043a\u0446\u0438\u0438:&nbsp; <\/p>\n<p><code>makedate(), maketimestamp(), makeinterval().&nbsp;<\/code><\/p>\n<p><code>makedate(year, month, day)&nbsp;<\/code>\u2013 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u0430\u0442\u0435 \u0438\u0437 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u043b\u044f &lt;\u0433\u043e\u0434&gt;, &lt;\u043c\u0435\u0441\u044f\u0446&gt; \u0438 &lt;\u0447\u0438\u0441\u043b\u043e&gt;.&nbsp;<\/p>\n<\/p>\n<p><code>makedate(2014, 8, 13)<\/code><\/p>\n<p><code>\/\/returns 2014-08-13.<\/code><\/p>\n<\/p>\n<p><code>maketimestamp(year, month, day, hour, min, sec[, timezone])&nbsp;<\/code>\u2013 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 Timestamp \u0438\u0437 \u043f\u043e\u043b\u0435\u0439 &lt;\u0433\u043e\u0434&gt;, &lt;\u043c\u0435\u0441\u044f\u0446&gt;, &lt;\u0447\u0430\u0441&gt;, &lt;\u043c\u0438\u043d&gt;, &lt;\u0441\u0435\u043a&gt;, &lt;\u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441&gt;.&nbsp;<\/p>\n<\/p>\n<p><code>maketimestamp(2014, 8, 13, 1,10,40.147)<\/code><\/p>\n<p><code>\/\/returns Timestamp 2014-08-13 1:10:40.147<\/code><\/p>\n<p><code>maketimestamp(2014, 8, 13, 1,10,40.147,CET)<\/code><\/p>\n<\/p>\n<p><code>makeinterval(years, months, weeks, days, hours, mins, secs)&nbsp;<\/code><em>\u2013 <\/em>\u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043c\u0435\u0436\u0434\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438<em>&nbsp;<\/em><\/p>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0434\u0430\u0442 \u0432<em>&nbsp;<\/em><code>makedate()&nbsp;<\/code>\u0438&nbsp;<code>make_timestam()&nbsp;<\/code>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 0.<\/p>\n<\/p>\n<p><strong>\u041d\u043e\u0432\u0430\u044f \u043e\u043f\u0446\u0438\u044f DataFrame.tail()&nbsp;<\/strong><\/p>\n<p>\u0412 Spark \u0435\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 <code>head(),<\/code> \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0442\u0430 \u0444\u0440\u0435\u0439\u043c\u0430, \u043d\u043e \u043d\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f <code>tail()<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f Pandas \u0432 Python. \u0412 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u044b Spark 3.0 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435<code> tail() <\/code>\u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u0435\u0433\u043e \u0445\u0432\u043e\u0441\u0442\u0430. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 <code>tail()<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>scala.Array[T]<\/code>&nbsp;\u0432 Scala.&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><code>val data=spark.range(1,100).toDF(\"num\").tail(5)<\/code><\/p>\n<p><code>data.foreach(print)<\/code><\/p>\n<p><code>\/\/Returns<\/code><\/p>\n<p><code>\/\/[95][96][97][98][99]<\/code><\/p>\n<\/p>\n<p><strong>\u0424\u0443\u043d\u043a\u0446\u0438\u044f repartition \u0432 SQL \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445<\/strong><\/p>\n<p>\u0412 SQL \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 Spark \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 actions, \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432&nbsp; Dataset\/DataFrame, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 Spark SQL \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f <a href=\"https:\/\/sparkbyexamples.com\/spark\/spark-repartition-vs-coalesce\/\">repartition()<\/a> \u0434\u043b\u044f \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430. \u0420\u0435\u043f\u0430\u0440\u0442\u0438\u0448\u0435\u043d \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432\u043d\u0443\u0442\u0440\u0438 SQL-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0438\u043b\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439.&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><code>val df=spark.range(1,10000).toDF(\"num\")<\/code><\/p>\n<p><code>println(\"Before re-partition :\"+df.rdd.getNumPartitions)<\/code><\/p>\n<p><code>df.createOrReplaceTempView(\"RANGE\u00a8C17CTABLE\")<\/code><\/p>\n<p><code>println(\"After re-partition :\"+df2.rdd.getNumPartitions)<\/code><\/p>\n<p><code>\/\/Returns&nbsp;<\/code><\/p>\n<p><code>\/\/Before re-partition :1<\/code><\/p>\n<p><code>\/\/After re-partition :20<\/code><\/p>\n<\/p>\n<p><strong>\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 ANSI SQL&nbsp;<\/strong><\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Spark \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f data-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 ANSI SQL, \u0432 Spark 3.0 \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043d\u0430\u0434 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435\u043c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0441 \u043d\u0438\u043c. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 true&nbsp;\u0432&nbsp;<code>spark.sql.parser.ansi.enabled<\/code>&nbsp;Spark \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.<\/p>\n<\/p>\n<hr>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u044b<a href=\"https:\/\/newprolab.com\/?utm_source=habr&amp;utm_medium=social&amp;utm_campaign=sparkPY&amp;utm_content=blog1130end\"><strong> Newprolab<\/strong><\/a> \u043f\u043e  Apache Spark:<\/p>\n<p><a href=\"https:\/\/newprolab.com\/ru\/spark-de?utm_source=habr&amp;utm_medium=social&amp;utm_campaign=sparkDE&amp;utm_content=blog1130end\"><strong>Apache Spark \u0434\u043b\u044f \u0434\u0430\u0442\u0430-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 (Scala)<\/strong><\/a>. \u0418\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u044b\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u0443\u0440\u0441 \u0438\u0437 11 \u0437\u0430\u043d\u044f\u0442\u0438\u0439, 5 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0445. <\/p>\n<p><a href=\"https:\/\/newprolab.com\/ru\/spark-module?utm_source=habr&amp;utm_medium=social&amp;utm_campaign=sparkPY&amp;utm_content=blog1130end\"><strong>Apache Spark (Python).<\/strong><\/a><strong> <\/strong>\u041c\u043e\u0434\u0443\u043b\u044c \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 \u043a\u0443\u0440\u0441\u0430 &#171;\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c&#187;. 6 \u0437\u0430\u043d\u044f\u0442\u0438\u0439, 5 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0445. <\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/newprolab\/blog\/530568\/\"> https:\/\/habr.com\/ru\/company\/newprolab\/blog\/530568\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041a \u043d\u0430\u0448\u0435\u0439 \u043d\u043e\u0432\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 <a href=\"https:\/\/newprolab.com\/ru\/spark-de?utm_source=habr&amp;utm_medium=social&amp;utm_campaign=sparkDE&amp;utm_content=blog3011\"><strong>&#171;Apache Spark \u0434\u043b\u044f \u0434\u0430\u0442\u0430-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432&#187;<\/strong><\/a> \u0438 <a href=\"https:\/\/www.facebook.com\/events\/444357059928208\/\"><strong>\u0432\u0435\u0431\u0438\u043d\u0430\u0440\u0443 \u043e \u043a\u0443\u0440\u0441\u0435<\/strong><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0439\u0434\u0435\u0442 2 \u0434\u0435\u043a\u0430\u0431\u0440\u044f, \u043c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043e\u0431\u0437\u043e\u0440\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e Spark 3.0. <\/p>\n<p>Spark 3.0 \u0432\u044b\u0448\u0435\u043b \u0441 \u0446\u0435\u043b\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0432\u0430\u0436\u043d\u044b\u0445 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439, \u0441\u0440\u0435\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445: \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ADQ, \u0447\u0442\u0435\u043d\u0438\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 SQL \u0438 Python, Python 3.0, \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 Hadoop 3, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 ACID.&nbsp;<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0430\u0432\u0442\u043e\u0440 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u043d\u043e\u0432\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u042d\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 Spark 3.0 \u0438 \u0443 \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435.<\/p>\n<\/p>\n<p><strong>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Spark 3.0:<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (AQE)<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043d\u043e\u0432\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u043e\u0432\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u0427\u0442\u0435\u043d\u0438\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043f\u0430\u043f\u043e\u043a<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u043d\u043e\u0433\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 (||)<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u043e\u0432\u044b\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Spark<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u043b\u0435\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0433\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>Data Frame Tail<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u0424\u0443\u043d\u043a\u0446\u0438\u044f Repartition \u0432 SQL \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 ANSI SQL<\/strong><\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0410\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/strong><\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (AQE) \u2013 \u044d\u0442\u043e, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u043e\u0434\u043d\u043e \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 Spark 3.0. \u041e\u043d\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u0442 \u043f\u043b\u0430\u043d\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<p>\u0414\u043e \u0432\u044b\u0445\u043e\u0434\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 3.0 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432 Spark \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u0430 \u043f\u0443\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043b\u0430\u043d\u0430 \u0434\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0430 \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f, Spark \u043d\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0442\u0440\u0438\u043a, \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u044b\u0445 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. AQE \u0432\u043e\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0431\u0435\u043b, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u0445, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u044d\u0442\u0430\u043f\u0435.&nbsp;&nbsp;<\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (AQE) \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0430. \u0414\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e spark.sql.adaptive.enabled&nbsp;\u043d\u0430 true. \u0421 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 AQE, Spark \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0434\u0432\u0443\u043a\u0440\u0430\u0442\u043d\u043e\u0435 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c TPC-DS \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 Spark 2.4&nbsp;<\/p>\n<p>AQE \u0432 Spark 3.0 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 3 \u0432\u0430\u0436\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u044b, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 join sort-merge \u0432 broadcast \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435&nbsp;<\/p>\n<\/li>\n<li>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0434\u0436\u043e\u0439\u043d\u044b \u0441\u043e \u0441\u043a\u043e\u0448\u0435\u043d\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043d\u043e\u0432\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432<\/strong><\/p>\n<p>\u0412 Spark 3.0 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u043b\u0430\u0441\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u044f\u0437\u044b\u043a\u043e\u0432, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f:&nbsp;<\/p>\n<ul>\n<li>\n<p>Python3 (Python 2.x)<\/p>\n<\/li>\n<li>\n<p>Scala 2.12<\/p>\n<\/li>\n<li>\n<p>JDK 11<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u043e\u0432\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 Hadoop \u0434\u043e 3 \u0432\u0435\u0440\u0441\u0438\u0438, Kafka \u0434\u043e 2.4.1 \u0438 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439.<\/p>\n<\/p>\n<p><strong>\u041d\u043e\u0432\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f Spark Structured Streaming<\/strong><\/p>\n<p>\u0412 web-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 Spark \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043d\u043e\u0432\u0430\u044f \u0432\u043a\u043b\u0430\u0434\u043a\u0430 \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0412 \u044d\u0442\u043e\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0437\u0430\u043f\u0443\u0441\u043a\u0430, \u0441\u0442\u0430\u0442\u0443\u0441, \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u0438\u043a\u0440\u043e-\u043f\u0430\u043a\u0435\u0442\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0438 \u0432\u043e\u0432\u0440\u0435\u043c\u044f \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<p>\u0412\u043a\u043b\u0430\u0434\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 2 \u0440\u0430\u0437\u0434\u0435\u043b\u0430:<\/p>\n<ul>\n<li>\n<p>\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b&nbsp;<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p><em>                                                                                                                       \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: Databricks<\/em><\/p>\n<\/p>\n<p>\u0420\u0430\u0437\u0434\u0435\u043b \u00abActive Streaming Queries\u00bb \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0432\u0441\u0435 <strong>\u0442\u0435\u043a\u0443\u0449\u0438\u0435<\/strong> \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0430 \u0440\u0430\u0437\u0434\u0435\u043b \u00abCompleted Streaming Queries\u00bb \u2013 \u0432\u0441\u0435 <strong>\u043d\u0435\u0443\u0434\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u0435<\/strong>.&nbsp;<\/p>\n<p>\u041f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 Run ID \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c: \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u0432\u043e\u0434\u0430, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430, \u0432\u0440\u0435\u043c\u044f, \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0432 Databricks.<\/p>\n<\/p>\n<p><strong>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432&nbsp;<\/strong><\/p>\n<p>Spark 3.0 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u201cbinaryFile\u201d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b.<\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 binaryFile, DataFrameReader \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0444\u043e\u0440\u043c\u0430\u0442\u044b image, pdf, zip, gzip, tar \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u041a\u0430\u0436\u0434\u044b\u0439 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u0435, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u0430.&nbsp;&nbsp;<\/p>\n<p><code>val df = spark.read.format(\"binaryFile\").load(\"\/tmp\/binary\/spark.png\")<\/code><\/p>\n<p><code>df.printSchema()<\/code><\/p>\n<p><code>df.show()<\/code><\/p>\n<\/p>\n<p>\u0412\u044b\u0434\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/p>\n<p><code>root<\/code><\/p>\n<p><code>&nbsp;|-- path: string (nullable = true)<\/code><\/p>\n<p><code>&nbsp;|-- modificationTime: timestamp (nullable = true)<\/code><\/p>\n<p><code>&nbsp;|-- length: long (nullable = true)<\/code><\/p>\n<p><code>&nbsp;|-- content: binary (nullable = true)&nbsp;<\/code><\/p>\n<p><code>+--------------------+--------------------+------+--------------------+<\/code><\/p>\n<p><code>|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; path|&nbsp; &nbsp; modificationTime|length| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content|<\/code><\/p>\n<p><code>+--------------------+--------------------+------+--------------------+<\/code><\/p>\n<p><code>|file:\/C:\/tmp\/bina\u2026|2020-07-25 10:11:\u2026| 74675|[89 50 4E 47 0D 0...|<\/code><\/p>\n<p><code>+--------------------+--------------------+------+--------------------+<\/code><\/p>\n<p><strong>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043f\u0430\u043f\u043e\u043a<\/strong><\/p>\n<p>\u0412 Spark 3.0 \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f&nbsp;recursiveFileLookup, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0445 \u043f\u043e\u0434\u043f\u0430\u043f\u043e\u043a. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f true&nbsp;\u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u043e\u043f\u0446\u0438\u0438, DataFrameReader \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0444\u0430\u0439\u043b\u044b, \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u044f \u0432\u0441\u0435 \u043f\u0430\u043f\u043a\u0438 \u0438 \u043f\u043e\u0434\u043f\u0430\u043f\u043a\u0438 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438.<\/p>\n<p><code>spark.read.option(\"recursiveFileLookup\", \"true\").csv(\"\/path\/to\/folder\")<\/code><\/p>\n<\/p>\n<p><strong>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u043d\u043e\u0433\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445&nbsp;<\/strong><\/p>\n<p>\u0412 Spark 3.0 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043d\u043e\u0433\u043e\u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f (||) \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u0438 \u0437\u0430\u043f\u0438\u0441\u0438 CSV \u0444\u0430\u0439\u043b\u043e\u0432. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c CSV \u0444\u0430\u0439\u043b \u0441 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435\u043c:<\/p>\n<p>&nbsp;<code>col1||col2||col3||col4<\/code><\/p>\n<p><code>val1||val2||val3||val4<\/code><\/p>\n<p><code>val1||val2||val3||val4<\/code><\/p>\n<\/p>\n<p>\u041e\u043d \u043c\u043e\u0436\u0435\u0442 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>&nbsp;<code>val df&nbsp; = spark.read<\/code><\/p>\n<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.option(\"delimiter\",\"||\")<\/code><\/p>\n<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.option(\"header\",\"true\")<\/code><\/p>\n<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.csv(\"\/tmp\/data\/douplepipedata.csv\")<\/code><\/p>\n<\/p>\n<p>\u0412 Spark 2.x \u043c\u043d\u043e\u0433\u043e\u0437\u043d\u0430\u0447\u043d\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0432 \u043e\u0434\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u041f\u043e\u043f\u044b\u0442\u043a\u0438 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0431\u0435\u0437 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439:<\/p>\n<p>&nbsp;<code>throws java.lang.IllegalArgumentException: Delimiter cannot be more than one character: ||<\/code><\/p>\n<\/p>\n<p><strong>\u041d\u043e\u0432\u044b\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Spark<\/strong><\/p>\n<p>\u041a \u0432\u043d\u0443\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u0441\u043f\u0438\u0441\u043a\u0443 \u0438\u0437 \u0441\u043e\u0442\u0435\u043d \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 Spark SQL, \u0442\u0440\u0435\u0442\u044c\u044f \u0432\u0435\u0440\u0441\u0438\u044f Spark \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430 \u043d\u043e\u0432\u044b\u0435.&nbsp;<\/p>\n<\/p>\n<p><code>sinh,cosh,tanh,asinh,acosh,atanh,any,bitand,bitor,bitcount,bitxor,<\/code><\/p>\n<p><code>booland,boolor,countif,datepart,extract,forall,fromcsv,<\/code><\/p>\n<p><code>makedate,makeinterval,maketimestamp,mapentries<\/code><\/p>\n<p><code>mapfilter,mapzipwith,maxby,minby,schemaofcsv,tocsv<\/code><\/p>\n<p><code>transformkeys,transform_values,typeof,version<\/code><\/p>\n<p><code>xxhash64<\/code><\/p>\n<\/p>\n<p><strong>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u041f\u0440\u043e\u043b\u0435\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c&nbsp;<\/strong><\/p>\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Spark \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u0430\u0442\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u042e\u043b\u0438\u0430\u043d\u0441\u043a\u043e\u0433\u043e \u0438 \u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u043e\u0433\u043e \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044f: \u0434\u043b\u044f \u0434\u0430\u0442 \u0434\u043e 1582 \u0433\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u042e\u043b\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c, \u0430 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u0445 \u0434\u0430\u0442 \u2013 \u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439. <\/p>\n<p>\u0412 JDK 7 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u0442 \u0436\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c<code> java.sql.Date&nbsp;API<\/code>. \u0412 JDK 8 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d <code>java.time.LocalDate&nbsp;API <\/code>\u0441 \u043e\u043f\u0446\u0438\u0435\u0439 \u043f\u0435\u0440\u0435\u0441\u0447\u0435\u0442\u0430 \u0434\u0430\u0442 \u043f\u043e \u041f\u0440\u043e\u043b\u0435\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u043e\u043c\u0443 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044e.&nbsp;<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432 Spark 3.0 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u043e\u043f\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u041f\u0440\u043e\u043b\u0435\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u043a Pandas, R \u0438 Apache Arrow. \u0415\u0441\u043b\u0438 \u0432\u044b \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0435 \u0434\u0430\u0442\u0430\u043c\u0438 \u0432 \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u043f\u043e\u0441\u043b\u0435 15 \u043e\u043a\u0442\u044f\u0431\u0440\u044f 1582 \u0433., \u0442\u043e \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Date&amp;Timestamp, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0432 Spark \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 3.0, \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e. \u0412\u0430\u0448\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0434\u0430\u0442\u044b \u0432 \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0434\u043e 15 \u043e\u043a\u0442\u044f\u0431\u0440\u044f 1582 \u0433.<\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u043e\u043f\u0446\u0438\u0435\u0439 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u041f\u0440\u043e\u043b\u0435\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c \u0432 Spark 3.0 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043d\u043e\u0432\u044b\u0435 Date &amp; Timestamp \u0444\u0443\u043d\u043a\u0446\u0438\u0438:&nbsp; <\/p>\n<p><code>makedate(), maketimestamp(), makeinterval().&nbsp;<\/code><\/p>\n<p><code>makedate(year, month, day)&nbsp;<\/code>\u2013 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u0430\u0442\u0435 \u0438\u0437 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u043b\u044f &lt;\u0433\u043e\u0434&gt;, &lt;\u043c\u0435\u0441\u044f\u0446&gt; \u0438 &lt;\u0447\u0438\u0441\u043b\u043e&gt;.&nbsp;<\/p>\n<\/p>\n<p><code>makedate(2014, 8, 13)<\/code><\/p>\n<p><code>\/\/returns 2014-08-13.<\/code><\/p>\n<\/p>\n<p><code>maketimestamp(year, month, day, hour, min, sec[, timezone])&nbsp;<\/code>\u2013 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 Timestamp \u0438\u0437 \u043f\u043e\u043b\u0435\u0439 &lt;\u0433\u043e\u0434&gt;, &lt;\u043c\u0435\u0441\u044f\u0446&gt;, &lt;\u0447\u0430\u0441&gt;, &lt;\u043c\u0438\u043d&gt;, &lt;\u0441\u0435\u043a&gt;, &lt;\u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441&gt;.&nbsp;<\/p>\n<\/p>\n<p><code>maketimestamp(2014, 8, 13, 1,10,40.147)<\/code><\/p>\n<p><code>\/\/returns Timestamp 2014-08-13 1:10:40.147<\/code><\/p>\n<p><code>maketimestamp(2014, 8, 13, 1,10,40.147,CET)<\/code><\/p>\n<\/p>\n<p><code>makeinterval(years, months, weeks, days, hours, mins, secs)&nbsp;<\/code><em>\u2013 <\/em>\u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043c\u0435\u0436\u0434\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438<em>&nbsp;<\/em><\/p>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0434\u0430\u0442 \u0432<em>&nbsp;<\/em><code>makedate()&nbsp;<\/code>\u0438&nbsp;<code>make_timestam()&nbsp;<\/code>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 0.<\/p>\n<\/p>\n<p><strong>\u041d\u043e\u0432\u0430\u044f \u043e\u043f\u0446\u0438\u044f DataFrame.tail()&nbsp;<\/strong><\/p>\n<p>\u0412 Spark \u0435\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 <code>head(),<\/code> \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0442\u0430 \u0444\u0440\u0435\u0439\u043c\u0430, \u043d\u043e \u043d\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f <code>tail()<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f Pandas \u0432 Python. \u0412 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u044b Spark 3.0 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435<code> tail() <\/code>\u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u0435\u0433\u043e \u0445\u0432\u043e\u0441\u0442\u0430. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 <code>tail()<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>scala.Array[T]<\/code>&nbsp;\u0432 Scala.&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><code>val data=spark.range(1,100).toDF(\"num\").tail(5)<\/code><\/p>\n<p><code>data.foreach(print)<\/code><\/p>\n<p><code>\/\/Returns<\/code><\/p>\n<p><code>\/\/[95][96][97][98][99]<\/code><\/p>\n<\/p>\n<p><strong>\u0424\u0443\u043d\u043a\u0446\u0438\u044f repartition \u0432 SQL \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445<\/strong><\/p>\n<p>\u0412 SQL \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 Spark \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 actions, \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432&nbsp; Dataset\/DataFrame, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 Spark SQL \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f <a href=\"https:\/\/sparkbyexamples.com\/spark\/spark-repartition-vs-coalesce\/\">repartition()<\/a> \u0434\u043b\u044f \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430. \u0420\u0435\u043f\u0430\u0440\u0442\u0438\u0448\u0435\u043d \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432\u043d\u0443\u0442\u0440\u0438 SQL-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0438\u043b\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439.&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><code>val df=spark.range(1,10000).toDF(\"num\")<\/code><\/p>\n<p><code>println(\"Before re-partition :\"+df.rdd.getNumPartitions)<\/code><\/p>\n<p><code>df.createOrReplaceTempView(\"RANGE\u00a8C17CTABLE\")<\/code><\/p>\n<p><code>println(\"After re-partition :\"+df2.rdd.getNumPartitions)<\/code><\/p>\n<p><code>\/\/Returns&nbsp;<\/code><\/p>\n<p><code>\/\/Before re-partition :1<\/code><\/p>\n<p><code>\/\/After re-partition :20<\/code><\/p>\n<\/p>\n<p><strong>\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 ANSI SQL&nbsp;<\/strong><\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Spark \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f data-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 ANSI SQL, \u0432 Spark 3.0 \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043d\u0430\u0434 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435\u043c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0441 \u043d\u0438\u043c. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 true&nbsp;\u0432&nbsp;<code>spark.sql.parser.ansi.enabled<\/code>&nbsp;Spark \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.<\/p>\n<\/p>\n<hr>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u044b<a href=\"https:\/\/newprolab.com\/?utm_source=habr&amp;utm_medium=social&amp;utm_campaign=sparkPY&amp;utm_content=blog1130end\"><strong> Newprolab<\/strong><\/a> \u043f\u043e  Apache Spark:<\/p>\n<p><a href=\"https:\/\/newprolab.com\/ru\/spark-de?utm_source=habr&amp;utm_medium=social&amp;utm_campaign=sparkDE&amp;utm_content=blog1130end\"><strong>Apache Spark \u0434\u043b\u044f \u0434\u0430\u0442\u0430-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 (Scala)<\/strong><\/a>. \u0418\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u044b\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u0443\u0440\u0441 \u0438\u0437 11 \u0437\u0430\u043d\u044f\u0442\u0438\u0439, 5 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0445. <\/p>\n<p><a href=\"https:\/\/newprolab.com\/ru\/spark-module?utm_source=habr&amp;utm_medium=social&amp;utm_campaign=sparkPY&amp;utm_content=blog1130end\"><strong>Apache Spark (Python).<\/strong><\/a><strong> <\/strong>\u041c\u043e\u0434\u0443\u043b\u044c \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 \u043a\u0443\u0440\u0441\u0430 &#171;\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c&#187;. 6 \u0437\u0430\u043d\u044f\u0442\u0438\u0439, 5 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0445. <\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/newprolab\/blog\/530568\/\"> https:\/\/habr.com\/ru\/company\/newprolab\/blog\/530568\/<\/a><br \/><\/br><\/br><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-314054","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/314054","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=314054"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/314054\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=314054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=314054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=314054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}