Uploaded image for project: 'Apache Lens'
  1. Apache Lens
  2. LENS-1522

python client fails to parse timestamps correctly

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.7
    • Fix Version/s: 2.7
    • Component/s: python-client
    • Labels:
    • Environment:
      MacOS X, python3.6
    • Flags:
      Patch

      Description

      In the latest version of the python client (python is 3.6), If a query with a time field is submitted with fetch_results set to true, iterating through the results object returned will always fail with a value error. Here is the error message:

      ~/pythonprogs/prog1/src/lenspythonclient/contrib/clients/python/lens/client/query.py in <genexpr>(.0)
          114
          115     def _parse_line(self, line):
      --> 116         return list(self._mapping(self.header.columns[index].type (line[index]) for index in range(len(line)))
          117
          118     def get_csv_reader(self, file):
      
      ValueError: invalid literal for int() with base 10: '2018-06-30 00:00:00.0'
      

      It seems that the actual type of the date field is timestamp, and is not converted correctly.

        Attachments

        1. lens.patch
          2 kB
          Raghav Shankar

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              raghav.shankar Raghav Shankar
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 5m
                5m
                Remaining:
                Remaining Estimate - 5m
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified