[ 
https://issues.apache.org/jira/browse/HIVE-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13151024#comment-13151024
 ] 

iryoung jeong commented on HIVE-839:
------------------------------------

Whenever people set-up new Hive cluster in my company, they used to forget to 
set to this option.

Therefore, I think this default value change is necessary.

IMHO, required code to fix this issue is so simple as well (even I can attached 
below) , and HIVE-2196 or related issues is good chance to apply this.

{noformat}
diff --git common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 
common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
index 2a52fd1..3124b60 100644
--- common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
+++ common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
@@ -285,7 +285,7 @@ public class HiveConf extends Configuration {
     HIVEPARTITIONNAME("hive.partition.name", ""),
     HIVESCRIPTAUTOPROGRESS("hive.script.auto.progress", false),
     HIVESCRIPTIDENVVAR("hive.script.operator.id.env.var", 
"HIVE_SCRIPT_OPERATOR_ID"),
-    HIVEMAPREDMODE("hive.mapred.mode", "nonstrict"),
+    HIVEMAPREDMODE("hive.mapred.mode", "strict"),
     HIVEALIAS("hive.alias", ""),
     HIVEMAPSIDEAGGREGATE("hive.map.aggr", true),
     HIVEGROUPBYSKEW("hive.groupby.skewindata", false),
diff --git conf/hive-default.xml conf/hive-default.xml
index 553624d..b7ec13c 100644
--- conf/hive-default.xml
+++ conf/hive-default.xml
@@ -447,7 +447,7 @@
 
 <property>
   <name>hive.mapred.mode</name>
-  <value>nonstrict</value>
+  <value>strict</value>
   <description>The mode in which the hive operations are being performed. In 
strict mode, some risky queries are not allowed to run<
 </property>
 
diff --git ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java 
ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java
index 35d124b..f4d1fff 100644
--- ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java
+++ ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java
@@ -199,6 +199,7 @@ public class QTestUtil {
   }
 
   public void initConf() throws Exception {
+    conf.setVar(HiveConf.ConfVars.HIVEMAPREDMODE, "nonstrict");
     if (miniMr) {
       assert dfs != null;
       assert mr != null;
{noformat}
                
> change default value of hive.mapred.mode to strict
> --------------------------------------------------
>
>                 Key: HIVE-839
>                 URL: https://issues.apache.org/jira/browse/HIVE-839
>             Project: Hive
>          Issue Type: Improvement
>          Components: Query Processor
>            Reporter: Namit Jain
>
> Most of the production servers would run in strict mode; so it might be a 
> good idea to have that as the default.
> It helps catching some bugs which might get unnoticed in nonstrict mode.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to