1. 25 Sep, 2020 2 commits
  2. 22 Jul, 2020 1 commit
  3. 23 Jun, 2020 1 commit
  4. 27 May, 2020 3 commits
  5. 26 May, 2020 1 commit
  6. 22 May, 2020 2 commits
  7. 13 May, 2020 1 commit
  8. 12 May, 2020 5 commits
  9. 28 Jan, 2020 2 commits
  10. 27 Jan, 2020 1 commit
  11. 24 Jan, 2020 6 commits
  12. 13 Dec, 2019 5 commits
  13. 12 Dec, 2019 3 commits
  14. 13 Dec, 2019 1 commit
    • Laurent Peuch's avatar
      [error/ux] improve lisibility of RQLSyntaxError messages · a35ff5755d8
      Laurent Peuch authored
      This is a first step in trying to make syntax error messages more useful.
      
      For this faulty RQL:
      
          DISTINCT Any N WHERE N is Network, N type "cold water", FCC calibration_for N, FCC variables ILIKE "%conso%", FCC in_state SFCC, FC use_calibration FCC, FC in_state SFC, SFC name "wfs_finished", FC prediction_date FCB, FC nhours FCH, FCP calibration_for N, FCP variables ILIKE "%prod%", FCP in_state SFCP, FP use_calibration FCP, FP in_state SFP, SFP name "wfs_finished", FP prediction_date FPB, FP nhours FPH, MAX(FCB, FCP) < MIN(FCB + CAST(Interval,CAST (String,FCH)+" hours"), FPB + CAST(Interval,CAST(String,FPH)+" hours"))'
      
      It will turn the error message from:
      
          RQLSyntaxError: DISTINCT Any N WHERE N is Network, N type "cold water", FCC calibration_for N, FCC variables ILIKE "%conso%", FCC in_state SFCC, FC use_calibration FCC, FC in_state SFC, SFC name "wfs_finished", FC prediction_date FCB, FC nhours FCH, FCP calibration_for N, FCP variables ILIKE "%prod%", FCP in_state SFCP, FP use_calibration FCP, FP in_state SFP, SFP name "wfs_finished", FP prediction_date FPB, FP nhours FPH, MAX(FCB, FCP) < MIN(FCB + CAST(Interval,CAST(String,FCH)+" hours"), FPB + CAST(Interval,CAST(String,FPH)+" hours"));
          at: ('<f.3664>', 1, 414)
          Trying to find one of QMARK, R_TYPE, CMP_OP, 'IN'
      
      To:
      
          RQLSyntaxError: Trying to find one of QMARK, R_TYPE, CMP_OP, 'IN' in:
          DISTINCT Any N WHERE N is Network, N type "cold water", FCC calibration_for N, FCC variables ILIKE "%conso%", FCC in_state SFCC, FC use_calibration FCC, FC in_state SFC, SFC name "wfs_finished", FC prediction_date FCB, FC nhours FCH, FCP calibration_for N, FCP variables ILIKE "%prod%", FCP in_state SFCP, FP use_calibration FCP, FP in_state SFP, SFP name "wfs_finished", FP prediction_date FPB, FP nhours FPH, MAX(FCB, FCP) < MIN(FCB + CAST(Interval,CAST(String,FCH)+" hours"), FPB + CAST(Interval,CAST(String,FPH)+" hours"));
      
          at line 1 and column 414
          around: ...n_date FPB, FP nhours FPH, MAX(FCB, FCP) < MIN(FCB + CAST(In...
                                                   ^ here
      
      Similarly, for this RQL (the same but on several lines):
      
          DISTINCT Any N WHERE N is Network, N type "cold water",
          FCC calibration_for N, FCC variables ILIKE "%conso%",
          FCC in_state SFCC, FC use_calibration FCC,
          FC in_state SFC, SFC name "wfs_finished",
          FC prediction_date FCB, FC nhours FCH,
          FCP calibration_for N, FCP variables ILIKE "%prod%",
          FCP in_state SFCP, FP use_calibration FCP,
          FP in_state SFP, SFP name "wfs_finished",
          FP prediction_date FPB, FP nhours FPH,
          MAX(FCB, FCP) <
          MIN(FCB + CAST(Interval,CAST(String,FCH)+" hours"),
              FPB + CAST(Interval,CAST(String,FPH)+" hours"));
      
      It will turn the error message from:
      
          RQLSyntaxError:   1: DISTINCT Any N WHERE N is Network, N type "cold water",
             2: FCC calibration_for N, FCC variables ILIKE "%conso%",
             3: FCC in_state SFCC, FC use_calibration FCC,
             4: FC in_state SFC, SFC name "wfs_finished",
             5: FC prediction_date FCB, FC nhours FCH,
             6: FCP calibration_for N, FCP variables ILIKE "%prod%",
             7: FCP in_state SFCP, FP use_calibration FCP,
             8: FP in_state SFP, SFP name "wfs_finished",
             9: FP prediction_date FPB, FP nhours FPH,
            10: MAX(FCB, FCP) <
            11: MIN(FCB + CAST(Interval,CAST(String,FCH)+" hours"),
            12:     FPB + CAST(Interval,CAST(String,FPH)+" hours"));
          at: ('<f.3665>', 10, 4)
          Trying to find one of QMARK, R_TYPE, CMP_OP, 'IN'
      
      To:
      
          RQLSyntaxError: Trying to find one of QMARK, R_TYPE, CMP_OP, 'IN' in:
            1: DISTINCT Any N WHERE N is Network, N type "cold water",
            2: FCC calibration_for N, FCC variables ILIKE "%conso%",
            3: FCC in_state SFCC, FC use_calibration FCC,
            4: FC in_state SFC, SFC name "wfs_finished",
            5: FC prediction_date FCB, FC nhours FCH,
            6: FCP calibration_for N, FCP variables ILIKE "%prod%",
            7: FCP in_state SFCP, FP use_calibration FCP,
            8: FP in_state SFP, SFP name "wfs_finished",
            9: FP prediction_date FPB, FP nhours FPH,
           10: MAX(FCB, FCP) <
           11: MIN(FCB + CAST(Interval,CAST(String,FCH)+" hours"),
           12:     FPB + CAST(Interval,CAST(String,FPH)+" hours"));
      
          at line 10 and column 4
          around: MAX(FCB, FCP) <
                     ^ here
      
      Closes #17256169
      370d237a
  15. 07 Nov, 2019 1 commit
  16. 06 Nov, 2019 5 commits