Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-2861

phoenix user-defined function

    XMLWordPrintableJSON

Details

    • Test
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.4.0
    • 4.4.1
    • None
    • hbase 0.98 phoenix4.4

    • Patch, Important

    Description

      I'm coding phoenix user-defined function recently.I have a problem when i code the function.I need to check the filed is null or not null.I upsert the data in phoenix set the filed null.Here is the code.
      String sourceStr = (String) getSourceStrExpression().getDataType().toObject(ptr,
      getSourceStrExpression().getSortOrder());
      if (ptr.getLength() == 0)

      { ptr.set(PVarchar.INSTANCE.toBytes("false"));}

      else

      { ptr.set(PVarchar.INSTANCE.toBytes("true"));}

      I always get true in phoenix but i think i will get false.
      How can i check the field is null?

      Attachments

        Activity

          People

            Unassigned Unassigned
            liusong liusong
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 101h
                101h
                Remaining:
                Remaining Estimate - 101h
                101h
                Logged:
                Time Spent - Not Specified
                Not Specified