Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1519

Standardize on "sub-query" rather than "subquery" in class names and comments

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.11.0
    • Component/s: None
    • Labels:

      Description

      I know it's foolish consistency, but this one has been bugging me for a long time. Let's standardize on "sub-query" rather than "subquery" in class names and comments.

      Here are the public and protected Java names that would change:

      • public interface SubqueryConverter becomes SubQueryConverter
      • public enum RelOptUtil.SubqueryType becomes SubQueryType
      • public void SqlPrettyWriter.setSubqueryStyle() becomes setSubQueryStyle
      • public void SqlToRelConverter.setSubqueryConverter() becomes setSubQueryConverter
      • public boolean SqlToRelConverter.canConvertSubquery() becomes canConvertSubQuery
      • public boolean SqlToRelConverter.convertSubquery() becomes convertSubQuery
      • public SqlToRelConverter.Config.getInSubqueryThreshold() becomes getInSubQueryThreshold

      These are breaking changes, but will be easy to identify and fix by just compiling the code, and the APIs are not widely used.

      The following will change, but leave behind the old name deprecated until 2.0:

      • public static final int SqlToRelConverter.DEFAULT_IN_SUBQUERY_THRESHOLD
      • public ConfigBuilder ConfigBuilder.withInSubqueryThreshold
      • public static Programs.subquery()
      • SqlAbstractParserImpl.ACCEPT_SUBQUERY becomes ACCEPT_SUB_QUERY
      • SqlAbstractParserImpl.ACCEPT_NONQUERY becomes ACCEPT_NON_QUERY

      Also a whole bunch of test names will change, and private/package-protected members, but that should not affect anyone.

        Issue Links

          Activity

          Hide
          julianhyde Julian Hyde added a comment -

          Can someone please review and +1? I know there are breaking changes here, but I believe they will not affect most users, and will require only a few minor, obvious changes for the rest.

          Show
          julianhyde Julian Hyde added a comment - Can someone please review and +1? I know there are breaking changes here, but I believe they will not affect most users, and will require only a few minor, obvious changes for the rest.
          Hide
          julianhyde Julian Hyde added a comment -

          Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/e38d51e8.

          There are lots of backward-compatible changes (e.g. leaving the old
          name but deprecated) but the following changes are breaking (albeit
          to APIs not widely used):

          • public interface SubqueryConverter becomes SubQueryConverter
          • public enum RelOptUtil.SubqueryType becomes SubQueryType
          • public void SqlPrettyWriter.setSubqueryStyle() becomes setSubQueryStyle
          • public void SqlToRelConverter.setSubqueryConverter() becomes setSubQueryConverter
          • public boolean SqlToRelConverter.canConvertSubquery() becomes canConvertSubQuery
          • public boolean SqlToRelConverter.convertSubquery() becomes convertSubQuery
          • public SqlToRelConverter.Config.getInSubqueryThreshold() becomes getInSubQueryThreshold
          Show
          julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/e38d51e8 . There are lots of backward-compatible changes (e.g. leaving the old name but deprecated) but the following changes are breaking (albeit to APIs not widely used): public interface SubqueryConverter becomes SubQueryConverter public enum RelOptUtil.SubqueryType becomes SubQueryType public void SqlPrettyWriter.setSubqueryStyle() becomes setSubQueryStyle public void SqlToRelConverter.setSubqueryConverter() becomes setSubQueryConverter public boolean SqlToRelConverter.canConvertSubquery() becomes canConvertSubQuery public boolean SqlToRelConverter.convertSubquery() becomes convertSubQuery public SqlToRelConverter.Config.getInSubqueryThreshold() becomes getInSubQueryThreshold
          Hide
          julianhyde Julian Hyde added a comment -

          Resolved in release 1.11.0 (2017-01-11).

          Show
          julianhyde Julian Hyde added a comment - Resolved in release 1.11.0 (2017-01-11).

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              julianhyde Julian Hyde
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development