[ https://issues.apache.org/jira/browse/HIVE-20703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16655624#comment-16655624 ]
Vineet Garg commented on HIVE-20703: ------------------------------------ bq. long executorMem = 4000000000L can be replaced by OperatorDesc.getMaxMemoryAvailable() which give max memory available per container (in case of tez) or executor in case of llap. During compilation getMaxMemoryAvailable() returns zero, perhaps this is set during execution? > Put dynamic sort partition optimization under cost based decision > ----------------------------------------------------------------- > > Key: HIVE-20703 > URL: https://issues.apache.org/jira/browse/HIVE-20703 > Project: Hive > Issue Type: Improvement > Components: Query Planning > Reporter: Vineet Garg > Assignee: Vineet Garg > Priority: Major > Attachments: HIVE-20703.1.patch, HIVE-20703.2.patch, > HIVE-20703.3.patch, HIVE-20703.4.patch, HIVE-20703.5.patch, > HIVE-20703.6.patch, HIVE-20703.7.patch, HIVE-20703.8.patch, HIVE-20703.9.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)