Explorar o código

HUE-1933 [impala] Fixing the SQL and hiding mapreduce button

Romain Rigaux %!s(int64=11) %!d(string=hai) anos
pai
achega
fd73459e8f

+ 1 - 1
apps/beeswax/src/beeswax/server/dbms.py

@@ -250,7 +250,7 @@ class HiveServer2Dbms(object):
     if result_meta.in_tablename:
       self.use(database)
 
-      hql = 'CREATE TABLE `%s.%s` AS %s' % (target_database, target_table, design.query['query'])
+      hql = 'CREATE TABLE %s.%s AS %s' % (target_database, target_table, design.query['query'])
       query_history = self.execute_statement(hql)
     else:
       # Case 2: The results are in some temporary location

+ 4 - 6
apps/beeswax/src/beeswax/templates/execute.mako

@@ -321,11 +321,9 @@ ${layout.menubar(section='query')}
       <a id="expandResults" href="javascript:void(0)" title="${_('See results in full screen')}" rel="tooltip"
         class="view-query-results hide pull-right"><h4 style="margin-right: 20px"><i class="fa fa-expand"></i></h4></a>
 
-      % if app_name != 'impala':
       <a id="save-results" data-bind="click: saveResultsModal" href="javascript:void(0)" title="${_('Save the results to HDFS or a new Hive table')}" rel="tooltip"
         class="view-query-results hide pull-right"><h4 style="margin-right: 20px"><i class="fa fa-save"></i></h4>
       </a>
-      % endif
 
       <a id="download-csv" data-bind="attr: {'href': '/${ app_name }/download/' + $root.design.history.id() + '/csv'}" href="javascript:void(0)" title="${_('Download the results in CSV format')}" rel="tooltip"
         class="view-query-results download hide pull-right"><h4 style="margin-right: 20px"><i class="hfo hfo-file-csv"></i></h4>
@@ -615,12 +613,12 @@ ${layout.menubar(section='query')}
             <span data-bind="visible: $root.design.results.save.type() == 'hdfs'">
               <input data-bind="value: $root.design.results.save.path" type="text" name="target_dir" placeholder="${_('Results location')}" class="pathChooser">
             </span>
-            % if app_name != 'impala':
             <label class="radio" data-bind="visible: $root.design.results.save.type() == 'hdfs'">
-              <input data-bind="checked: $root.design.results.save.rerun" type="checkbox" name="rerun">
-              ${ _('Run an export query') }
+              % if app_name != 'impala':
+                <input data-bind="checked: $root.design.results.save.rerun" type="checkbox" name="rerun">
+                ${ _('Run an export query') }
+              % endif
             </label>
-            % endif
           </div>
         </div>
       </fieldset>

+ 1 - 1
apps/beeswax/static/js/beeswax.vm.js

@@ -57,7 +57,7 @@ function BeeswaxViewModel(server) {
         'errors': null,
         'type': 'hive-table',
         'path': null,
-        'rerun': true
+        'rerun': false
       }
     },
     'watch': {