You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/05/12 11:01:12 UTC

[GitHub] [incubator-doris] lihuigang opened a new pull request, #9527: doris support query hive bitmap type

lihuigang opened a new pull request, #9527:
URL: https://github.com/apache/incubator-doris/pull/9527

   # Proposed changes
   
   ## Problem Summary:
   
   Doris support query hive bitmap type
   
   The binary(bitmap) in hive is generated by the bitmap udf function in fe/hive-udf, the bitmap in hive is exactly the same as the bitmap in doris
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (No)
   2. Has unit tests been added: (No)
   3. Has document been added or modified: (Yes)
   4. Does it need to update dependencies: (No)
   5. Are there any changes that cannot be rolled back: (No)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] lihuigang commented on a diff in pull request #9527: doris support query hive bitmap type

Posted by GitBox <gi...@apache.org>.
lihuigang commented on code in PR #9527:
URL: https://github.com/apache/incubator-doris/pull/9527#discussion_r874984855


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/ColumnDef.java:
##########
@@ -172,7 +172,7 @@ public void analyze(boolean isOlap) throws AnalysisException {
         }
 
         // disable Bitmap Hll type in keys, values without aggregate function.
-        if (type.isBitmapType() || type.isHllType()) {
+        if (isOlap && type.isBitmapType() || type.isHllType()) {

Review Comment:
   I don't think it will affect. In the olap type table, the bitmap and hll fields need to be restricted to only be used as aggregate types, not as keys. All external tables are non-olap type tables, and non-olap type tables do not need to be restricted



-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] lihuigang commented on a diff in pull request #9527: doris support query hive bitmap type

Posted by GitBox <gi...@apache.org>.
lihuigang commented on code in PR #9527:
URL: https://github.com/apache/incubator-doris/pull/9527#discussion_r871978500


##########
fe/fe-core/src/main/java/org/apache/doris/load/Load.java:
##########
@@ -1064,6 +1064,12 @@ private static void initColumns(Table tbl, List<ImportColumnDesc> columnExprs,
                 // which is not nullable.
                 slotDesc.setIsNullable(true);
                 slotDesc.setColumn(new Column(realColName, PrimitiveType.VARCHAR));
+
+                boolean isBitmapType = tbl.getColumn(columnName).getType().isBitmapType();
+                if(isBitmapType){

Review Comment:
   Yes, thank you. I have changed the code logic



-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] cambyzju commented on a diff in pull request #9527: doris support query hive bitmap type

Posted by GitBox <gi...@apache.org>.
cambyzju commented on code in PR #9527:
URL: https://github.com/apache/incubator-doris/pull/9527#discussion_r871946344


##########
new-docs/en/ecosystem/external-table/hive-of-doris.md:
##########
@@ -104,16 +105,20 @@ The supported Hive column types correspond to Doris in the following table.
 |   DECIMAL  | DECIMAL |  |
 |   DATE   |  DATE  |                                   |
 |   TIMESTAMP  | DATETIME | Timestamp to Datetime will lose precision |
+|  BINARY   |  BITMAP  |  |

Review Comment:
   need another white-space before BINARY? It seams there are 4 white-space before 'TIMESTAMP', but 3 white-space before 'BINARY'.



-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] lihuigang closed pull request #9527: doris support query hive bitmap type

Posted by GitBox <gi...@apache.org>.
lihuigang closed pull request #9527: doris support query hive bitmap type
URL: https://github.com/apache/incubator-doris/pull/9527


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] BiteTheDDDDt commented on a diff in pull request #9527: doris support query hive bitmap type

Posted by GitBox <gi...@apache.org>.
BiteTheDDDDt commented on code in PR #9527:
URL: https://github.com/apache/incubator-doris/pull/9527#discussion_r873376453


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/ColumnDef.java:
##########
@@ -172,7 +172,7 @@ public void analyze(boolean isOlap) throws AnalysisException {
         }
 
         // disable Bitmap Hll type in keys, values without aggregate function.
-        if (type.isBitmapType() || type.isHllType()) {
+        if (isOlap && type.isBitmapType() || type.isHllType()) {

Review Comment:
   Does this affect other types of external tables?



-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] cambyzju commented on a diff in pull request #9527: doris support query hive bitmap type

Posted by GitBox <gi...@apache.org>.
cambyzju commented on code in PR #9527:
URL: https://github.com/apache/incubator-doris/pull/9527#discussion_r871945229


##########
fe/fe-core/src/main/java/org/apache/doris/load/Load.java:
##########
@@ -1064,6 +1064,12 @@ private static void initColumns(Table tbl, List<ImportColumnDesc> columnExprs,
                 // which is not nullable.
                 slotDesc.setIsNullable(true);
                 slotDesc.setColumn(new Column(realColName, PrimitiveType.VARCHAR));
+
+                boolean isBitmapType = tbl.getColumn(columnName).getType().isBitmapType();
+                if(isBitmapType){

Review Comment:
   I think it is better to change the code logic like: if (isBitmapType) { xxx } else { xxx }.
   Then we could sure functions like, setIsMaterialized and setIsNullable and so on, are called as expected.



-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] lihuigang commented on a diff in pull request #9527: doris support query hive bitmap type

Posted by GitBox <gi...@apache.org>.
lihuigang commented on code in PR #9527:
URL: https://github.com/apache/incubator-doris/pull/9527#discussion_r871979292


##########
new-docs/en/ecosystem/external-table/hive-of-doris.md:
##########
@@ -104,16 +105,20 @@ The supported Hive column types correspond to Doris in the following table.
 |   DECIMAL  | DECIMAL |  |
 |   DATE   |  DATE  |                                   |
 |   TIMESTAMP  | DATETIME | Timestamp to Datetime will lose precision |
+|  BINARY   |  BITMAP  |  |

Review Comment:
   Thank you. I've added a white-space



-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org