Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-18673

Sql. Negative column indexes in ORDER BY clause are not rejected

    XMLWordPrintableJSON

Details

    • Docs Required, Release Notes Required

    Description

      The simple example:

      SELECT * FROM test ORDER BY -1
      

      See test_order_by_exceptions.test.

      Add statement error: <err message> to other test cases as well.

      It seems that this issue is caused the current implementation of IgniteSqlValidator::validateLiteral which skips the validation entirely

      @Override
      public void validateLiteral(SqlLiteral literal) {
          if (literal.getTypeName() != SqlTypeName.DECIMAL) {
              super.validateLiteral(literal);
          }
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            mzhuravkov Maksim Zhuravkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: