WHERE子句不起作用的Hive查询(ORC表)

时间:2018-04-04 09:07:41

标签: hive visual-studio-code hiveql hdinsight

正在查询的表格:

col_name    data_type   comment
# col_name              data_type               comment             
number  int Format: <integer> | Example: 0 | Description: Ascending number series

# Detailed Table Information    NULL    NULL
Database:               hfe_reference           NULL
Owner:                  admin                   NULL
CreateTime:             Tue Mar 20 04:19:39 UTC 2018    NULL
LastAccessTime:         UNKNOWN                 NULL
Protect Mode:           None                    NULL
Retention:              0   NULL
Location:               xxxxxxxxx   NULL
Table Type:             MANAGED_TABLE           NULL
Table Parameters:   NULL    NULL
    SORTBUCKETCOLSPREFIX    TRUE                
    auto.purge              true                
    comment                 Holds a number series that can be used to join onto for calculations
    immutable               true                
    numFiles                5
    orc.bloom.filter.columns    number              
    orc.bloom.filter.fpp    0.05
    orc.compress            SNAPPY              
    orc.compress.size       262144
    orc.create.index        true                
    orc.row.index.stride    500000
    orc.stripe.size         67108864
    tag_created_by          xxxxxxx
    tag_created_date        3/03/2018
    tag_release_environment xxxxxxx
    tag_release_modified_by xxxxxxx
    tag_release_timestamp   18:46.5
    totalSize               884634582
    transient_lastDdlTime   1522819180
    NULL    NULL

# Storage Information   NULL    NULL
SerDe Library:          org.apache.hadoop.hive.ql.io.orc.OrcSerde   NULL
InputFormat:            org.apache.hadoop.hive.ql.io.orc.OrcInputFormat NULL
OutputFormat:           org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat    NULL
Compressed:             No                      NULL
Num Buckets:            1   NULL
Bucket Columns:         [number]                NULL
Sort Columns:           [Order(col:number, order:1)]    NULL
Storage Desc Params:    NULL    NULL
    serialization.format    1

细节:

select number from hfe_reference.dim_number limit 10;

这有效:

select number from hfe_reference.dim_number where number < 5;

这不,查询运行,但结果为空:

WHERE

已使用其他where number = 2条款,例如where number between 0 and 5 import io.circe._, io.circe.generic.auto._, io.circe.parser._, io.circe.syntax._ case class Test(a: Map[String,String]) val map = Test(Map("a"->"1","2"->"2")).asJson val hcursor = map.hcursor val m = hcursor.downField("a").as[Map[String,String]] println(m) // Right(Map(a -> 1, 2 -> 2))

为什么WHERE子句导致空结果集?

0 个答案:

没有答案