spark1.2.0 version Sparksql using parquet type considerations

Source: Internet
Author: User

Considerations when using the Parquet storage type in the Spark1.2.0 version:

SQL statements:

Select *  from Order_created_dynamic_partition_parquet;

To perform the results in Spark-sql:

 the -  to [email protected] [[email protected]2014-05 [Email     protected] [     [email protected]2014-05 [] [ email protected] [[email protected]2014-05 [email      protected]     [email protected]2014-05 [Email protected]< C12/>[[email protected]

To perform the results in Beeline:

Error:

[B cannot is cast to java.lang.String (state=,code=0)

To perform the results in hive:

ordernumber event_time event_month10703007267488   the- to- on  .: on:12.334+ on       the- to10101043505096   the- to- on  -: -:12.342+ on       the- to10103043509747   the- to- on  -: -:12.33+ on        the- to10103043501575   the- to- on  the: -:12.33+ on        the- to10104043514061   the- to- on  the:Geneva:12.324+ on       the- to

Can be set by setting

set spark.sql.parquet.binaryAsString=true

To resolve problems in Spark-sql and Beeline, the default value of this parameter is false in the spark1.2.0 version;

Description: Some Other parquet-producing systems, in particular Impala and older versions of Spark SQL, does not differentiate Betwee n binary data and strings when writing out the parquet schema. This flag tells Spark SQL to interpret binary data as a string to provide compatibility with these systems.

spark1.2.0 version Sparksql using parquet type considerations

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.