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

[WIP][CARBONDATA-3277] Support to show subquery for datamap #3108

Closed
wants to merge 1 commit into from

Conversation

kevinjmh
Copy link
Member

@kevinjmh kevinjmh commented Jan 28, 2019

What's in this PR:
support show query statement which was used to create preaggregate/mv datamap

Example output from testcase:

+-----------+------------+--------------------------+------------------+------------------------------------------+
|DataMapName|ClassName   |Associated Table          |DataMap Properties|Subquery                                  |
+-----------+------------+--------------------------+------------------+------------------------------------------+
|preagg1    |preaggregate|default.preaggmain_preagg1|                  |select a,sum(b) from PreAggMain group by a|
+-----------+------------+--------------------------+------------------+------------------------------------------+


+-----------+---------+----------------------+----------------------+---------------------------------------------+
|DataMapName|ClassName|Associated Table      |DataMap Properties    |Subquery                                     |
+-----------+---------+----------------------+----------------------+---------------------------------------------+
|datamap1   |mv       |default.datamap1_table|'full_refresh'='false'| select empname, designation from fact_table1|
+-----------+---------+----------------------+----------------------+---------------------------------------------+

+-----------+----------+---------------------------------+---------------------------------------------+-------------------------------------------------------------+
|DataMapName|ClassName |Associated Table                 |DataMap Properties                           |Subquery                                                     |
+-----------+----------+---------------------------------+---------------------------------------------+-------------------------------------------------------------+
|agg0_hour  |timeSeries|default.datamapshowtest_agg0_hour|'event_time'='mytime', 'hour_granularity'='1'|SELECT mytime, SUM(age) FROM datamapshowtest  GROUP BY mytime|
+-----------+----------+---------------------------------+---------------------------------------------+-------------------------------------------------------------+

How about add command? @2019.9.29

  protected lazy val descDataMap: Parser[LogicalPlan] =
    DESCRIBE ~> DATAMAP ~> ident <~ opt(";") ^^ {
      case dmname => CarbonDataMapShowCommand(None)
    }

Be sure to do all of the following checklist to help us incorporate
your contribution quickly and easily:

  • Any interfaces changed?

  • Any backward compatibility impacted?

  • Document update required?

  • Testing done
    Please provide details on
    - Whether new unit test cases have been added or why no new tests are required?
    - How it is tested? Please attach test report.
    - Is it a performance related change? Please attach the performance test report.
    - Any additional information to help reviewers in testing this change.

  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

Build Failed with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10735/

@CarbonDataQA
Copy link

Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2705/

@kevinjmh kevinjmh changed the title [CARBONDATA-3277] Support to show child query for preaggregate/mv datamap [CARBONDATA-3277] Support to show subquery for datamap Jan 28, 2019
@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@kevinjmh
Copy link
Member Author

When Subquery is too long, it will affect user experience for having a glance of all datamaps.

@kevinjmh kevinjmh changed the title [CARBONDATA-3277] Support to show subquery for datamap [WIP][CARBONDATA-3277] Support to show subquery for datamap Feb 25, 2019
@qiuchenjian
Copy link
Contributor

qiuchenjian commented Feb 26, 2019

When Subquery is too long, it will affect user experience for having a glance of all datamaps.

@kevinjmh
Can you show the subquery multiply line and it has max character limit or use parameter to decide to whether show it

@qiuchenjian
Copy link
Contributor

@kevinjmh
If this pr is finished in the future, please update the doc

@kevinjmh kevinjmh closed this Jun 24, 2019
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

4 participants