[
https://issues.apache.org/jira/browse/HIVE-12727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15392921#comment-15392921
]
Chao Sun commented on HIVE-12727:
---------------------------------
I'm actually a little confused about this. From the code:
{code}
private static String makeMessage(String what, ConfVars setting) {
return what + " are disabled for safety reasons. If you know what you are
doing, please make"
+ " sure that " + setting.varname + " is set to false and that "
+ ConfVars.HIVEMAPREDMODE.varname + " is not set to 'strict' to
enable them.";
}
{code}
it seems like if {{hive.mapred.mode}} is NOT set to 'strict', then these 3 new
configurations are activated.
However, in another piece of code:
{code}
private static boolean isAllowed(Configuration conf, ConfVars setting) {
String mode = HiveConf.getVar(conf, ConfVars.HIVEMAPREDMODE, null);
return (mode != null) ? !"strict".equals(mode) :
!HiveConf.getBoolVar(conf, setting);
}
{code}
it seems like as long as {{hive.mapred.mode}} is not null AND not 'strict',
then the above 3 configurations are disabled, i.e., their values are ignored.
Is this intentional?
(BTW, how can I set the {{hive.mapred.mode}} to null? it seems Hive just load
the default value which is 'nonstrict')
> refactor Hive strict checks to be more granular, allow order by no limit and
> no partition filter by default for now
> -------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-12727
> URL: https://issues.apache.org/jira/browse/HIVE-12727
> Project: Hive
> Issue Type: Bug
> Reporter: Sergey Shelukhin
> Assignee: Sergey Shelukhin
> Priority: Blocker
> Labels: TODOC2.0
> Fix For: 2.0.0
>
> Attachments: HIVE-12727.01.patch, HIVE-12727.02.patch,
> HIVE-12727.03.patch, HIVE-12727.04.patch, HIVE-12727.05.patch,
> HIVE-12727.06.patch, HIVE-12727.07.patch, HIVE-12727.patch
>
>
> Making strict mode the default recently appears to have broken many normal
> queries, such as some TPCDS benchmark queries, e.g. Q85:
> Response message: org.apache.hive.service.cli.HiveSQLException: Error while
> compiling statement: FAILED: SemanticException [Error 10041]: No partition
> predicate found for Alias "web_sales" Table "web_returns"
> We should remove this restriction from strict mode, or change the default
> back to non-strict. Perhaps make a 3-value parameter, nonstrict, semistrict,
> and strict, for backward compat for people who are relying on strict already.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)