You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "ASiegeLion (via GitHub)" <gi...@apache.org> on 2023/12/12 09:34:41 UTC

[I] [Bug]The combination of Command and Aggregate operators causes colmun verification to fail [kyuubi]

ASiegeLion opened a new issue, #5847:
URL: https://github.com/apache/kyuubi/issues/5847

   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   
   
   ### Search before asking
   
   - [X] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Describe the bug
   
   test code:
   
     test("auth: Command and Aggregate operators causes colmun verification to fail") {
       val db = "default"
       val table = "src"
       val col = "key"
   
       val create = s"CREATE TABLE IF NOT EXISTS $db.$table ($col int, value int) USING $format"
       val select = s"CACHE TABLE TEST AS SELECT key FROM $db.$table group by key"
       withCleanTmpResources(Seq((s"$db.$table", "table"))) {
         doAs("bob", sql(create))
         doAs("kent", sql(select).collect())
       }
     }
   
   ![image](https://github.com/apache/kyuubi/assets/30170267/a80f96ae-2d4c-40b8-aef6-9ce23408aec4)
   
   explain :
   CacheTableAsSelect TEST, SELECT key  FROM default.src group by key, false, true
      +- Aggregate [key#17], [key#17]
         +- SubqueryAlias spark_catalog.default.src
            +- HiveTableRelation [`spark_catalog`.`default`.`src`, org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, Data Cols: [key#17, value#18], Partition Cols: []]
   
   This paln did not generate  **project** operator, causing PrivilegesBuilder's mergeProjection to merge all columns of HiveTableRelation.
   ![image](https://github.com/apache/kyuubi/assets/30170267/e54279e9-0708-489c-bac3-84dfac6dfc67)
   
   
   
   
   ### Affects Version(s)
   
   master
   
   ### Kyuubi Server Log Output
   
   _No response_
   
   ### Kyuubi Engine Log Output
   
   _No response_
   
   ### Kyuubi Server Configurations
   
   _No response_
   
   ### Kyuubi Engine Configurations
   
   _No response_
   
   ### Additional context
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
   - [ ] No. I cannot submit a PR at this time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org