Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CARBONDATA-2979] select count fails when carbondata file is written through SDK and read through sparkfileformat for complex datatype map(struct->array->map) #2774

Closed

Conversation

manishgupta88
Copy link
Contributor

Problem
Select query failed issue for map type when data is loaded using avro SDK and external table using carbon file format is used to query the data

Analysis
When data is loaded through Avro SDK which has a schema of type struct<array>, fieldName was hard coded to "val" because of which during query the schema written in the file footer and schema inferred for the external table had a mismatch which lead to failure.

Solution
Instead of hard coding the field value as "val" use the given field name in the schema

  • Any interfaces changed?
    No
  • Any backward compatibility impacted?
    No
  • Document update required?
    No
  • Testing done
    UT Added
  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
    NA

… SDK and external table using carbon file format is used to query the data
@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/607/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/8868/

@CarbonDataQA
Copy link

Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/799/

@ravipesala
Copy link
Contributor

LGTM

@ravipesala
Copy link
Contributor

retest this please

@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/674/

@CarbonDataQA
Copy link

Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/870/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/8938/

@ravipesala
Copy link
Contributor

LGTM

@asfgit asfgit closed this in 682160f Oct 3, 2018
xuchuanyin pushed a commit to xuchuanyin/carbondata that referenced this pull request Oct 19, 2018
…through SDK and read through sparkfileformat for complex datatype map(struct->array->map)

Problem
Select query failed issue for map type when data is loaded using avro SDK and external table using carbon file format is used to query the data

Analysis
When data is loaded through Avro SDK which has a schema of type struct<array>, fieldName was hard coded to val because of which during query the schema written in the file footer and schema inferred for the external table had a mismatch which lead to failure.

Solution
Instead of hard coding the field value as val use the given field name in the schema

This closes apache#2774
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants