Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-20634

DirectSQL does not retry in ORM mode while getting partitions by filter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • None
    • None
    • None
    • None

    Description

      The code path for getting partitions by filter is as follows,

        protected List<Partition> getPartitionsByFilterInternal(..) {
         ...
            @Override
            protected boolean canUseDirectSql(GetHelper<List<Partition>> ctx) throws MetaException 
           {
              return directSql.generateSqlFilterForPushdown(ctx.getTable(), tree, filter);
            }
         ...
        }
      

      If directSql.generateSqlFilterForPushdown throws an exception, we should be returning false from canUseDirectSql instead of propagating the exception. The propagation of exception causes the whole query to fail, instead of retrying with JDO.

      We should have code such as

            @Override
            protected boolean canUseDirectSql(GetHelper<Integer> ctx) throws MetaException {
              try {
                return directSql.generateSqlFilterForPushdown(ctx.getTable(), exprTree, filter);
              } catch (final MetaException me) {
                return false;
              }
            }
      

      Attachments

        Activity

          People

            karthik.manamcheri Karthik Manamcheri
            karthik.manamcheri Karthik Manamcheri
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: