Purvi Barot

Ranch Hand
+ Follow
since Apr 16, 2019
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
6
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Purvi Barot

  • A Java Array object is of fixed size. Inside ArrayList, there is an Array, which is also of fixed size, but as you add more items to your list, the ArrayList class automatically creates a larger internal Array and then copies the elements across to it.
  • If you want to have both flexible sizing AND array-like behavior, then ArrayList is a good option. If you want to get a larger array sometimes, then you'll have to essentially do what ArrayList does: create a larger array and copy the existing elements across.
  • On the whole, Array is useful for some situations where you want very efficient access to a fixed size set of data. The moment you think it might change size, you should consider on of the other, more flexible collection classes.
  • 8 months ago
    You haven't shown us what's in the variables.Rather surprisingly perhaps,
    can be true, for example when the value of $storeid is the sequence (1, 2). But it would be a little odd to name the variable storeid if it can hold a sequence of integers. So I suspect that's not what you intended.

    The expression
    seems even less plausible. If $Type is an empty sequence, then the result will be false (because ()!='B1' is false, and ()!='B1' is also false). In all other cases the expression will be true:
    There is no performance difference whatsoever. Both methods use exactly the same execution engine and internal data structures. At the end of the day, all boils down to personal preferences.

  • DataFrame queries are much easier to construct programmatically and provide a minimal type safety.


  • Plain SQL queries can be significantly more concise and easier to understand. They are also portable and can be used without any modifications with every supported language. With HiveContext, these can also be used to expose some functionalities which can be inaccessible in other ways (for example UDF without Spark wrappers).
  • 11 months ago