Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-7316

QueryRecord string vs char

    XMLWordPrintableJSON

Details

    • Bug
    • Status: In Progress
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      When including a string in a QueryRecord SQL alias, it truncates the string to one character when writing out to a Record with types. For instance, when using the CSVReader and JsonRecordSetWriter and the expression select *, 'red' AS color from flowfile, the type of red ends up being Types.CHAR which is mapped to RecordFieldType.CHAR. When writing as JSON, the string gets coerced to a char and becomes just "r". When writing as CSV however, since no type coercion occurs, the value "red" gets written as expected.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              drodrigues Dustin Rodrigues
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m