If you have an item that is larger than the space inside a bag of holding, or if the item has dimensions (for the sake of the question, say it is largely L-shaped) that would prevent it all from fitting through the opening of the bag of holding, can it still fit partially inside the extradimensional space inside this wondrous item?
If it can fit through the opening, it can go in ...
... as long as it's volume (and all other items already in the bag) is less than the maximum volume of 64 cubic feet (8'x2'x4' or 4'x4'x4' or whatever ...). The description in the text does not limit by size or shape beyond that; the exterior dimensions are all that is specified. No provision is made for being partially in and partially out. A related question addresses the volume concern here.
The only dimensional constraint on the objects in the bag is volume1.
Length, width, or height don't matter as long as the object can fit through the opening and does not have more volume than allowed.
- Due to the objects in the bag being in a space in another dimension, I'd recommend the following ruling: oddly shaped items need to be ruled "in or out" as the status of any item being in the bag or not. That is consistent with dumping everything out by turning the bag inside out, per the item description. Why? The item when in the bag is in another place where magic makes some bits of reality different. The item outside of the bag is in the character's place, where reality is 'normal.' The interior is a place where volume does not conform to the bag's exterior dimensions. The boundary (or transition area, a membrane even) is where things go into, and out of, the bag.
interior space considerably larger than its outside dimensions, roughly 2 feet in diameter at the mouth and 4 feet deep. (SRD, p. 210; DMG, p. 153)
To avoid having the bag burst, make sure that the volume of all items does not exceed the maximum capacity.
If the bag is overloaded, pierced, or torn, it ruptures and is destroyed, and its contents are scattered in the Astral Plane. (SRD V5.1, p. 210; DMG, p. 153 )
If your DM rules that part of it can stick out, that's within the DM's purview but it seems unnecessary to me. The inside dimensions (linear) of the bag are not constrained/defined/limited.
1 You can argue that another constraint is weight... 500 pounds being the max ... but that won't influence whether it fits inside the bag or not.