Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-4881

JSON parsing of MySQL TEXT field

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.8.0
    • None
    • Client - CLI
    • None
    • Linux
      Java 1.8

    Description

      I have a MySQL table with a TEXT field with a JSON string and I would like to query this table filtering on field value inside JSON.

      I tried first a SELECT All in this form:

      SELECT *,CONVERT_FROM(config,'JSON') FROM MyTable

      But, has I have for the same JSON field, different data types, I always got the error:
      You tried to write a VarChar type when you are using a ValueWriter of type NullableBigIntWriterImpl
      and similar (BigInt for example).

      I tried changing the option store.json.all_text_mode and/or store.json.read_numbers_as_double but it seems the options are used only if reading from JSON files and not from CONVERT_FROM.

      Attachments

        Activity

          People

            Unassigned Unassigned
            webfrank Francesco Boscarino
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: