<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>《Hive JOIN使用详解》的评论</title>
	<atom:link href="http://shiyanjun.cn/archives/588.html/feed" rel="self" type="application/rss+xml" />
	<link>http://shiyanjun.cn/archives/588.html</link>
	<description>简单之美，难得简单，享受简单的唯美。</description>
	<lastBuildDate>Wed, 19 Feb 2025 08:08:30 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.2</generator>
	<item>
		<title>作者：CK</title>
		<link>http://shiyanjun.cn/archives/588.html#comment-58447</link>
		<dc:creator><![CDATA[CK]]></dc:creator>
		<pubDate>Thu, 06 Apr 2017 03:02:28 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=588#comment-58447</guid>
		<description><![CDATA[这样写可能会生成多个MR任务，效率可能不是太好]]></description>
		<content:encoded><![CDATA[<p>这样写可能会生成多个MR任务，效率可能不是太好</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：kingzhouming</title>
		<link>http://shiyanjun.cn/archives/588.html#comment-58436</link>
		<dc:creator><![CDATA[kingzhouming]]></dc:creator>
		<pubDate>Mon, 03 Apr 2017 05:16:47 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=588#comment-58436</guid>
		<description><![CDATA[少写了个key
SELECT a.val, b.val FROM
(select key,val from a where ds=’2009-07-07′) a
left JOIN
(select key,val from b where ds=’2009-07-07′) b
ON a.key=b.key;]]></description>
		<content:encoded><![CDATA[<p>少写了个key<br />
SELECT a.val, b.val FROM<br />
(select key,val from a where ds=’2009-07-07′) a<br />
left JOIN<br />
(select key,val from b where ds=’2009-07-07′) b<br />
ON a.key=b.key;</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：kingzhouming</title>
		<link>http://shiyanjun.cn/archives/588.html#comment-58435</link>
		<dc:creator><![CDATA[kingzhouming]]></dc:creator>
		<pubDate>Mon, 03 Apr 2017 05:15:37 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=588#comment-58435</guid>
		<description><![CDATA[楼主的逻辑也有问题，正确的写法时先用子查询过滤

SELECT a.val, b.val FROM
  (select val from a where ds=&#039;2009-07-07&#039;) a
left JOIN
  (select val from b where ds=&#039;2009-07-07&#039;) b
ON a.key=b.key;]]></description>
		<content:encoded><![CDATA[<p>楼主的逻辑也有问题，正确的写法时先用子查询过滤</p>
<p>SELECT a.val, b.val FROM<br />
  (select val from a where ds=&#8217;2009-07-07&#8242;) a<br />
left JOIN<br />
  (select val from b where ds=&#8217;2009-07-07&#8242;) b<br />
ON a.key=b.key;</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：neil</title>
		<link>http://shiyanjun.cn/archives/588.html#comment-58203</link>
		<dc:creator><![CDATA[neil]]></dc:creator>
		<pubDate>Thu, 09 Feb 2017 10:00:05 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=588#comment-58203</guid>
		<description><![CDATA[inner join的话确实可以这么用，但是外连接的话这两种写法是不一样的.楼主的逻辑是错的.]]></description>
		<content:encoded><![CDATA[<p>inner join的话确实可以这么用，但是外连接的话这两种写法是不一样的.楼主的逻辑是错的.</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：abel12</title>
		<link>http://shiyanjun.cn/archives/588.html#comment-57376</link>
		<dc:creator><![CDATA[abel12]]></dc:creator>
		<pubDate>Mon, 25 Apr 2016 03:16:44 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=588#comment-57376</guid>
		<description><![CDATA[楼上是对的，或者
SELECT a.val, b.val FROM a LEFT OUTER JOIN b
ON (a.key=b.key AND b.ds=a.ds )
where a.ds=’2009-07-07′


主表的过滤必须写在where后，从表的过滤要写在on后
--hql有这样的规则吗？]]></description>
		<content:encoded><![CDATA[<p>楼上是对的，或者<br />
SELECT a.val, b.val FROM a LEFT OUTER JOIN b<br />
ON (a.key=b.key AND b.ds=a.ds )<br />
where a.ds=’2009-07-07′</p>
<p>主表的过滤必须写在where后，从表的过滤要写在on后<br />
&#8211;hql有这样的规则吗？</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：gzd</title>
		<link>http://shiyanjun.cn/archives/588.html#comment-57197</link>
		<dc:creator><![CDATA[gzd]]></dc:creator>
		<pubDate>Sat, 02 Apr 2016 13:57:57 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=588#comment-57197</guid>
		<description><![CDATA[楼主的文章很好！非常感谢]]></description>
		<content:encoded><![CDATA[<p>楼主的文章很好！非常感谢</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Yanjun</title>
		<link>http://shiyanjun.cn/archives/588.html#comment-56407</link>
		<dc:creator><![CDATA[Yanjun]]></dc:creator>
		<pubDate>Wed, 28 Oct 2015 02:49:16 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=588#comment-56407</guid>
		<description><![CDATA[你这逻辑很有问题，假如a是一个分区表，你这么写会先把a表的所有数据都与b进行JOIN，如果a有N个分区，都要根据ON后条件判断与b表JOIN，得到的一个JOIN后的大表，再根据WHERE过滤，这可能干了大量无用的工作。]]></description>
		<content:encoded><![CDATA[<p>你这逻辑很有问题，假如a是一个分区表，你这么写会先把a表的所有数据都与b进行JOIN，如果a有N个分区，都要根据ON后条件判断与b表JOIN，得到的一个JOIN后的大表，再根据WHERE过滤，这可能干了大量无用的工作。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Paul</title>
		<link>http://shiyanjun.cn/archives/588.html#comment-56402</link>
		<dc:creator><![CDATA[Paul]]></dc:creator>
		<pubDate>Tue, 27 Oct 2015 12:07:55 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=588#comment-56402</guid>
		<description><![CDATA[左关联，从业务上一般应该是a、b表都取同一个分区的，楼主的逻辑都有问题，达不到效果，应该是
SELECT a.val, b.val FROM a LEFT OUTER JOIN b
ON (a.key=b.key AND b.ds=&#039;2009-07-07&#039; )
where a.ds=&#039;2009-07-07&#039;
主表的过滤必须写在where后，从表的过滤要写在on后]]></description>
		<content:encoded><![CDATA[<p>左关联，从业务上一般应该是a、b表都取同一个分区的，楼主的逻辑都有问题，达不到效果，应该是<br />
SELECT a.val, b.val FROM a LEFT OUTER JOIN b<br />
ON (a.key=b.key AND b.ds=&#8217;2009-07-07&#8242; )<br />
where a.ds=&#8217;2009-07-07&#8242;<br />
主表的过滤必须写在where后，从表的过滤要写在on后</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Yanjun</title>
		<link>http://shiyanjun.cn/archives/588.html#comment-53080</link>
		<dc:creator><![CDATA[Yanjun]]></dc:creator>
		<pubDate>Sat, 24 Jan 2015 02:26:37 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=588#comment-53080</guid>
		<description><![CDATA[HQL执行，最终会翻译成MR，你可以在Hadoop集群上查看，启动JobHistoryServer，然后通过Web界面就能够看到。]]></description>
		<content:encoded><![CDATA[<p>HQL执行，最终会翻译成MR，你可以在Hadoop集群上查看，启动JobHistoryServer，然后通过Web界面就能够看到。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：伍尚森</title>
		<link>http://shiyanjun.cn/archives/588.html#comment-52982</link>
		<dc:creator><![CDATA[伍尚森]]></dc:creator>
		<pubDate>Wed, 21 Jan 2015 09:04:53 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=588#comment-52982</guid>
		<description><![CDATA[请问在hive中如何查看sql运行时启动的mr个数呢？]]></description>
		<content:encoded><![CDATA[<p>请问在hive中如何查看sql运行时启动的mr个数呢？</p>
]]></content:encoded>
	</item>
</channel>
</rss>
