Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-22650

hive udf I can use the udf select ,but when insert into table ,the value is null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.2.1
    • None
    • UDF
    • None
    • hdp 2.6.2 hive1.2.1

    Description

      hive udf I can use the udf select ,but when insert into table ,the value is null :
      hive> select transCity(name) as city,name
      > from bd_area t1
      > where t1.level_id='1'
      > limit 10;
      110100000000 北京市
      120100000000 天津市
      130100000000 石家庄市
      130200000000 唐山市
      130300000000 秦皇岛市
      130400000000 邯郸市
      130500000000 邢台市
      130600000000 保定市
      130700000000 张家口市
      130800000000 承德市

      hive> create table test
      > as
      > select transCity(name) as city,name
      > from bd_area t1
      > where t1.level_id='1'
      > limit 10;

      hive> select * from test;
      OK
      NULL 北京市
      NULL 天津市
      NULL 石家庄市
      NULL 唐山市
      NULL 秦皇岛市
      NULL 邯郸市
      NULL 邢台市
      NULL 保定市
      NULL 张家口市
      NULL 承德市

      Attachments

        1. sources.rar
          2 kB
          yuxuqi

        Activity

          People

            Unassigned Unassigned
            lucky_yu yuxuqi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: