• 【Hive】FAILED: ParseException line 24:17 extraneous input ';' expecting EOF near '<EOF>'


    在hive命令中执行如下DDL

    CREATE  TABLE store_test
    (
        id                      bigint comment "PK",
        store_name_cn           string comment "store name",
        store_id                string comment "store id",
        store_activation_status smallint comment "store status(1-activate 2-forbidden)",
        country                 string comment "store country",
        province                string comment "store province",
        province_code           string comment "stores'province code",
        city                    string comment "store city",
        city_code               string comment "store's city code",
        address                 string comment "store address",
        telephone               string comment "store's telephone",
        postal_code             string comment "store's postal code",
        longitude               decimal(10, 7) comment "store's longitude",
        latitude                decimal(10, 7) comment "store's latitude",
        city_flagship           string comment "is the city flagship",
        national_flagship       string comment "is the national flagship",
        store_sort              smallint comment "the position of store",
        dept_id                 bigint comment "the department id",
        store_number           string comment "dkts poslo'g store number"
    ) comment "store"
        partitioned by (pt string)
        STORED AS ORC;

    出现报错:

    FAILED: ParseException line 24:17 extraneous input ';' expecting EOF near '<EOF>'

    通过逐渐删减字段,定位到了问题原因是单引号 的数量为奇数(是有点奇怪...)

     解决办法:

       对单引号进行转义

    参考:

    Escaped single quote in COMMENT is not handled properly · Issue #63 · xnuinside/simple-ddl-parser (github.com)

  • 相关阅读:
    备忘录模式(java)
    06
    观察者模式(java)
    迭代器模式(c++)
    06
    07
    2021.11.21(迭代器模式c++)
    2021.11.24(状态模式java)
    2021.11.22(hive安装)
    2021.11.23(MYSQL安装)
  • 原文地址:https://www.cnblogs.com/144823836yj/p/16722217.html
Copyright © 2020-2023  润新知