pirate_shady
pirate_shady

Reputation: 83

Role of ?+.+ in select statement in HiveQL

I have some HQL code which I am trying to understand. Below is the code.

FROM (SELECT col_1, col_2, col_3 FROM t1)
INSERT OVERWRITE TABLE t2
SELECT `(col_1)?+.+`

Can someone explain how does this ?+.+ work ? and what is the keyword to refer to this type of construct in sql/hql ?

Upvotes: 2

Views: 624

Answers (1)

pirate_shady
pirate_shady

Reputation: 83

I think I found the solution. The select statement is just using a regular expression, so in this case

SELECT (col_1)?+.+

will select all columns except col_1

Reference Doc: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Select

Upvotes: 2

Related Questions